Using signs and currency symbols
The picture characters S, +, and – specify signs in numeric character data. The picture character $ (or the currency symbol) specifies a currency symbol in the character value of numeric character data. Only one type of sign character can appear in each field.
- currency symbol
- Specifies the currency symbol. Consider the following example:
dcl Price picture '$99V.99'; Price = 12.45;The character value of
Priceis'$12.45'. Its arithmetic value is12.45.For information about specifying a character as a currency symbol, refer to Defining currency symbols.
- S
- Specifies the plus sign character (+) if the data value is >=0;
otherwise, it specifies the minus sign character (-). The rules are
identical to those for the currency symbol. Consider the following example:
dcl Root picture 'S999';The value
50is held as'+050', the value0as'+000', and the value-243as'-243'. - +
- Specifies the plus sign character (+) if the data value is >=0; otherwise, it specifies a blank. The rules are identical to those for the currency symbol.
- -
- Specifies the minus sign character (-) if the data value is <0; otherwise, it specifies a blank. The rules are identical to those for the currency symbol.
Signs and currency symbols can be used in either a static or a drifting manner.