How to: |
Reference: |
You can select a currency symbol for display in report output regardless of the default currency symbol configured for National Language Support (NLS). Use the extended currency symbol format in place of the floating dollar (M) or non-floating dollar (N) display option. When you use the floating dollar (M) or non-floating dollar (N) display option, the currency symbol associated with the default code page is displayed. For example, when you use an American English code page, the dollar sign is displayed.
Note: You can use the SET CURRSYMB command to control which symbol displays for the M and N options.
The extended currency symbol format allows you to display a symbol other than the dollar sign. For example, you can display the symbol for a United States dollar, a British pound, a Japanese yen, or the euro. Extended currency symbol support is available for numeric formats (I, D, F, and P).
Use the following character combinations as the final two characters in any numeric display format:
Display Option |
Description |
Example |
---|---|---|
!d |
Fixed dollar sign. |
D12.2!d |
:d |
Fixed dollar sign. |
D12.2:d |
!D |
Floating dollar sign. |
D12.2!D |
:D |
Floating dollar sign. |
D12.2:D |
!e |
Fixed euro symbol. |
F9.2!e |
:e |
Fixed euro symbol. |
F9.2:e |
!E |
Floating euro symbol on the left side. |
F9.2!E |
:E |
Floating euro symbol on the left side. |
F9.2:E |
!F |
Floating euro symbol on the right side. |
F9.2!F |
:F |
Floating euro symbol on the right side. |
F9.2:F |
!l |
Fixed British pound sign. |
D12.1!l |
:l |
Fixed British pound sign. |
D12.1:l |
!L |
Floating British pound sign. |
D12.1!L |
:L |
Floating British pound sign. |
D12.1:L |
!y |
Fixed Japanese yen symbol. |
I9!y |
:y |
Fixed Japanese yen symbol. |
I9:y |
!Y |
Floating Japanese yen symbol. |
I9!Y |
:Y |
Floating Japanese yen symbol. |
I9:Y |
Note: The colon (:) is equivalent to the exclamation point (!), however, only the colon is invariant across code pages, so using the colon is recommended.
The following guidelines apply:
numeric_format{:|!}option
where:
Is a valid numeric format (data type I, D, F, or P).
Either : or ! is required, but only the colon is invariant across code pages.
Determines the currency symbol that is displayed, and whether the symbol is floating or non-floating. Possible values are:
d displays a non-floating dollar sign.
D displays a floating dollar sign.
e displays a non-floating euro symbol.
E displays a floating euro symbol on the left side.
F displays a floating euro symbol on the right side.
l displays a non-floating British pound sterling symbol.
L displays a floating British pound sterling symbol.
y displays a non-floating Japanese yen symbol.
Y displays a floating Japanese yen symbol.
The following request displays the euro symbol:
SET PAGE-NUM = OFF TABLE FILE CENTORD PRINT PRODNAME QUANTITY PRICE/D10.2:E BY ORDER_DATE WHERE QUANTITY GT 700; ON TABLE SET STYLE * TYPE = REPORT, GRID = OFF,$ ENDSTYLE END
The output is: