CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)

You can use the subcommands CCA, CCB, CCC, CCD, and CCE to specify up to five custom currency formats.

  • Each custom currency subcommand defines one custom format and can include four specifications in the following order: a negative prefix, a prefix, a suffix, and a negative suffix.
  • The specifications are delimited by either periods or commas, whichever you do not want to use as a decimal point in the format.
  • If your custom currency format includes periods or commas that you need to distinguish from delimiters, use a single quotation mark as an escape character before the period or comma that is part of the custom currency format. For example, if the format includes a period but the decimal indicator is a comma, the period must also be used as the delimiter.
  • Each currency specification must always contain three commas or three periods. All other specifications are optional.
  • Use blanks in the specification only where you want blanks in the format.
  • The entire specification must be enclosed in single or double quotation marks. If the format includes a single quotation mark as an escape character, the entire specification must be enclosed in double quotation marks.
  • A specification cannot exceed 16 characters (excluding the apostrophes).
  • Custom currency formats cannot be specified as input formats on DATA LIST. Use them only as output formats in the FORMATS, WRITE FORMATS, PRINT FORMATS, WRITE, and PRINT commands.

Specifying a Custom Currency Format

SET CCA='-,$,,'.
  • A minus sign (-) preceding the first command is used as the negative prefix.
  • A dollar sign is specified for the prefix.
  • No suffixes are specified (there are two consecutive commas before the closing apostrophe).
  • Because commas are used as separators in the specification, the decimal point is represented by a period.

Specifying Multiple Custom Currency Formats

SET CCA='(,,,-)'  CCB=',,%,' CCC='(,$,,)' CCD='-/-.Dfl ..-'.
FORMATS VARA(CCA9.0)/ VARB(CCB6.1)/ VARC(CCC8.0)/ VARD(CCD14.2).
  • SET defines four custom currency formats.
  • FORMATS assigns these formats to specific variables.
Table 1. Custom currency examples
  CCA CCB CCC CCD
negative prefix ( none ( –/–
prefix none none $ Dfl
suffix none % none none
negative suffix –) none )
separator , , , .
sample positive number 23,456 13.7% $352 Dfl 37.419,00
sample negative number (19,423–) 13.7% ($189) –/–Dfl 135,19–