CURRENCY SIGN Clause

The CURRENCY SIGN clause is used to define a currency string that will be:
  • Inserted into a numeric-edited data item when it is used as a receiving item
  • Removed from a numeric-data item (de-edited) when determining the unedited numeric value of the item.
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

Read syntax diagramSkip visual syntax diagramCURRENCYSIGNISliteral-6WITHPICTURE SYMBOLliteral-71
Notes:
  • 1 IBM® Extension
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
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:
  • Digits zero (0) through nine (9)
  • Uppercase alphabetic characters A B C D P R S V X Z, or their lower case equivalents
  • A space
  • Special characters * + - / , . ; ( ) = "
  • A figurative constant
IBM Extension
IBM Extension
  • The uppercase alphabetic character E if the program defines an external floating-point item.
  • Uppercase alphabetic characters G and N if the program defines a DBCS or national item.
  • Lowercase alphabetic characters e, g, and n.
End of IBM Extension
End of IBM Extension

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:
  • Digits zero (0) through nine (9)
  • Special characters * + - / . ,
  • A space or spaces without any other characters
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.