Functional Description
Purpose
This Business Function (B0700048) is used to move the decimal of a given amount to the left or
right, depending on the Data Dictionary Items that are place in the FROM and TO Data Item parameters.
Setup Notes and Prerequisites
Parameters to be sent into and out of this Function:
Move Decimal From Data Item -> (Example - WCRG)
Move Decimal To Data Item -> (Example - GENR)
Amount <-> (Example - mnAmount)
Special Logic
Technical Specification
Go out to the Data Dictionary and get the Display Decimal Positions for the From and To Data Item
sent into this Function.
Take the From Data Item Display Decimals and subtract the To Data Item Display Decimals to find the
difference in between the two.
If the Difference is greater than 1
Do the following the number of times equal to the Difference:
mnAmount = mnAmount * 10
End Do
Else
If the Difference is less than 1
Difference = Difference * -1
Do the following the number of times equal to the Difference:
mnAmount = mnAmount * .1
End Do
End If
End If
Example:
mnAmount = .00122
Display Decimals for WCRG = 5 (From Data Item)
Display Decimals for GENR = 3 (To Data Item)
Difference between the FROM and TO Display Decimals: 5-3=2
Move the decimal Position to the Right two positions.
.00122 * 10 = .0122
.01220 * 10 = .1200
mnAmount = .12200
D0700048 - Get and Move Decimal Position
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
szMoveDecimalFromDataItem | DTAI | char | OPT | INPUT |
A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or
| ||||
szMoveDecimalToDataItem | DTAI | char | OPT | INPUT |
A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or
| ||||
mnAmount | MN29D9 | MATH_NUMERIC | OPT | BOTH |
This is a generic field used as a work field in Everest. | ||||
cErrorFlag | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. |
None |
None |