0% found this document useful (0 votes)
392 views2 pages

CALL - CALC - VALUE - M - 14-Apr-2020

This formula calls the CALC_DIR_VALUE function to calculate a value. It takes in several inputs, including a base value and parameters like a range value, calculation factor, and range offset. It first sets up default values for the parameters if they are not provided. It then checks if any range overrides are provided, and validates that the arrays match if so before defining a dynamic range to pass to the CALC_DIR_VALUE function. It finally calls CALC_DIR_VALUE, passing in the appropriate parameters, and returns the result along with additional details.

Uploaded by

iceyroses
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
392 views2 pages

CALL - CALC - VALUE - M - 14-Apr-2020

This formula calls the CALC_DIR_VALUE function to calculate a value. It takes in several inputs, including a base value and parameters like a range value, calculation factor, and range offset. It first sets up default values for the parameters if they are not provided. It then checks if any range overrides are provided, and validates that the arrays match if so before defining a dynamic range to pass to the CALC_DIR_VALUE function. It finally calls CALC_DIR_VALUE, passing in the appropriate parameters, and returns the result along with additional details.

Uploaded by

iceyroses
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

/*

Formula Name : CALL_CALC_VALUE


Decription
This formula performs the call to the CALC_DIR_VALUE function and
any supporting functions.
*/
DEFAULT FOR range_value is 1
DEFAULT FOR calculation_factor is 1
DEFAULT FOR range_offset is 0
DEFAULT FOR range_low_override is EMPTY_NUMBER_NUMBER
DEFAULT FOR range_high_override is EMPTY_NUMBER_NUMBER
default for value_name is EMPTY_TEXT_NUMBER
default for value_value is EMPTY_TEXT_NUMBER
default for value_datatype is EMPTY_TEXT_NUMBER
INPUTS ARE base,
range_value,
calculation_factor,
range_offset,
range_low_override,
range_high_override,
value_name,
value_value,
value_datatype

/* Setup the Overrides */


/* This uses the VBC functions as they use the same cache */

l_dummy = VALUE_CRITERIA_INIT()

i = 1
while (i =< value_name.count) loop
(
dummy = PAY_INTERNAL_LOG_WRITE('Put Value')
l_dummy = VALUE_CRITERIA_PUT_VALUE(value_name[i], value_value[i],
value_datatype[i])
i = i + 1
)

IF (range_value was defaulted) THEN


local_range = base
ELSE
local_range = range_value

/* Do we have a range overrides. If so validate that


the arrays match. The create the dynamic range
*/
if (( range_low_override was defaulted
and range_high_override was not defaulted)
or
( range_low_override was not defaulted
and range_high_override was defaulted)
or
( range_low_override.count <> range_high_override.count)
) then
x1 = PAY_LOG_ERROR('PAY_ARRAY_NOT_MATCH')

periodicity = 'NONE'
out_uom = 'NONE'
if (range_high_override was not defaulted) then
(
rge_name = 'CoreTemp'
x = DEFINE_RANGE(rge_name)
counter = 1
while (counter <= range_high_override.count) loop
(
x = DEFINE_RANGE_ITEM(rge_name, range_low_override[counter],
range_high_override[counter])
counter = counter + 1
)
ded_amount = CALC_DIR_VALUE(periodicity, out_uom, base, local_range,
calculation_factor, range_offset, rge_name)

)
else
(
ded_amount = CALC_DIR_VALUE(periodicity, out_uom, base, local_range,
calculation_factor, range_offset)
)

RETURN ded_amount, periodicity, out_uom

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy