Rational Developer for System z
COBOL for Windows, Version 7.5, Language Reference


CURRENCY SIGN clause

The CURRENCY SIGN clause affects numeric-edited data items whose PICTURE character-strings contain a currency symbol. A currency symbol represents a currency sign value that is:

Typically, currency sign values identify the monetary units stored in a data item. For example: '$', 'EUR', 'CHF', 'JPY', 'HK$', 'HKD', or X'9F' (hexadecimal code point in some EBCDIC code pages for Begin image description. This image shows the Euro currency symbol. End image description., the Euro currency sign). For more details on programming techniques for handling the Euro, see the COBOL for Windows Programming Guide.

The CURRENCY SIGN clause specifies a currency sign value and the currency symbol used to represent that currency sign value in a PICTURE clause.

The SPECIAL-NAMES paragraph can contain multiple CURRENCY SIGN clauses. Each CURRENCY SIGN clause must specify a different currency symbol. Unlike all other PICTURE clause symbols, currency symbols are case sensitive. For example, 'D' and 'd' specify different currency symbols.

CURRENCY SIGN IS literal-6
literal-6 must be an alphanumeric literal. literal-6 must not be a figurative constant or a null-terminated literal. literal-6 must not contain a multibyte character.

If the PICTURE SYMBOL phrase is not specified, literal-6:

If the PICTURE SYMBOL phrase is specified, literal-6:

PICTURE SYMBOL literal-7
Specifies a currency symbol that can be used in a PICTURE clause to represent the currency sign value specified by literal-6.

literal-7 must be an alphanumeric literal consisting of one single-byte character. literal-7 must not be any of the following:

If the CURRENCY SIGN clause is specified, the CURRENCY and NOCURRENCY compiler options are ignored. If the CURRENCY SIGN clause is not specified and the NOCURRENCY compiler option is in effect, the dollar sign ($) is used as the default currency sign value and currency symbol. For more information about the CURRENCY and NOCURRENCY compiler options, see the COBOL for Windows Programming Guide.


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)