FN_E$BDG - Format number/amount to text
Inclusion in RPG source
- C /COPY E$LIB/SRC(ILE),FN_E$BDG
C /COPY E$LIB/SRC(ILE),FN_E$CLZ
Invocation
- EXSR E$BDG
Input Parameters
- @BDG (d13.2)
- Field in which the amount must be stored prior to the call to E$BDG.
- @BDGN (d13.0)
- Field in which the number must be stored prior to the call to E$BDG. If non-zero, the field has priority over @BDG.
- @BDGFL (d1)
- When 1, signals E$BDG to format the number or amount with 2 decimals.
Output Parameters
- @BDGFM (a15)
- Field in which the formatted number or amount is stored after processing by E$BDG.
What it does
- Formats an amount or number in a numeric field into an alphanumeric field.
Examples
-
* * Amount field = 6.2 * Currency = NLG (= with comma) * C Z-ADD1 @BDGFL C Z-ADDAMOUNT @BDG (-40,00 -> -40,00) C EXSR E$BDG C MOVE @BDGFM #FIELD P (' 40,00-') * * Amount field = 6.2 * Currency = BFR (= without comma) * C Z-ADD*ZERO @BDGFL C Z-ADDAMOUNT @BDG (-40,00 -> -40,00) C EXSR E$BDG C MOVE @BDGFM #FIELD P (' 4000-') * * Numberfield = 6.0 * Has preference over Amount field * C Z-ADDNUMBER @BDGN (-40 -> -40) C EXSR E$BDG C MOVE @BDGFM #FIELD P (' 40-') *
Go to download page