ILE COBOL Language Reference


CURRENCY SIGN Clause

The CURRENCY SIGN clause is used to define a currency string that will be:

In addition, the clause may also be used to specify the symbol that is to be used to represent a currency string within a PICTURE character-string. This symbol is referred to as the currency symbol.

CURRENCY SIGN Clause - Format
 
>>-CURRENCY--+------+--+----+--literal-6------------------------>
             '-SIGN-'  '-IS-'
 
>--+------------------------------------------+----------------><
   |                                     (1)  |
   '-+------+--PICTURE SYMBOL--literal-7------'
     '-WITH-'
 
 

Notes:

  1. IBM Extension

+-------------------------------IBM Extension--------------------------------+

Note:
The CURRENCY SIGN clause can be repeated to allow for more than one currency string in a COBOL program. However, the value of a currency symbol must not be duplicated.

+----------------------------End of IBM Extension----------------------------+

When the CURRENCY SIGN clause is omitted, the dollar sign ($) must be used for both the value of the currency string and the currency symbol.

literal-6 without PICTURE SYMBOL phrase
Specifies the value of the currency string as well as the character that will be used as the currency symbol. It must be a single-character, nonnumeric literal, and must not be any of the following:

The currency symbol is case sensitive and must be specified throughout your program with the same case as used in the CURRENCY SIGN clause. However, unless the OPTION parameter value *NOMONOPIC, or the PROCESS statement option NOMONOPIC is specified, an alphabetic currency symbol used in a PICTURE character-string will be considered to be uppercase, regardless of its actual representation. Therefore an alphabetic currency symbol must always be entered as uppercase, unless the NOMONOPIC option is specified.

literal-6 with PICTURE SYMBOL phrase
If the PICTURE SYMBOL phrase is specified, literal-6 specifies the value of the currency string and literal-7 represents the currency symbol. Literal-6 may have any length (multiple characters) and may consist of any characters from the computer's character set except for the following:
literal-7
If the PICTURE SYMBOL phrase is specified, literal-7 specifies the character that will be used as the currency symbol. It must be a single-character, nonnumeric literal, and must not have the same value as any other currency symbol defined in the program. The value of this character is subject to the same restrictions as those that apply to the currency sign (literal-6) when the PICTURE SYMBOL phrase is omitted.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]