COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

Table 32 PICTURE Character-String Symbols (continued)
DescriptionSymbol Counts in
Item’s Size
Symbol
symbol, the sign-editing symbol represents the position where
the sign-control symbol goes.
CR
DB
Represents a leading numeric character position that is to be
replaced by an asterisk (*) if its contents and the contents of all
Yes*
preceding numeric character positions are 0. All asterisks must
precede any 9 s.
Represents the character position where the currency symbol is
to be placed. The dollar sign ($) is used unless a CURRENCY
SIGN clause specifies another single character.
Yes$
NOTE: If you use the DECIMAL-POINT COMMA clause in the SPECIAL-NAMES paragraph in
the Environment Division, periods function as commas, and commas function as periods.
Neither the period nor the comma can be the last (rightmost) symbol of a PICTURE
character-string ; with this exception: when the comma, semicolon, or period separator
follows the character-string. In this case a preceding comma or period character is acceptable
as the last symbol in the character-string ; for example:
999. is “999” followed by a period separator
999., is “999.” followed by a comma separator
Precedence Rules
Figure 8 shows the order of precedence for the symbols in a PICTURE character-string. An x
at an intersection indicates that the symbol at the top of the column can precede the symbol
at the left of the row. Where two symbols appear in a column or row, they are mutually
exclusive within the same character-string.
The comma (,) and period (.) insertion symbols can be reversed by the DECIMAL-POINT
COMMA clause (see DECIMAL-POINT Clause (page 114)).
The symbol cs represents the currency symbol.
The nonfloating insertion symbols plus (+) and minus (-), the floating insertion symbols Z,
asterisk (*), plus (+), minus (-), and cs, and the symbol P appear twice. The leftmost column
and uppermost row for each symbol represents its use to the left of the decimal point position.
The other appearance of the symbol represents its use to the right of the decimal point position.
Each PICTURE character-string must contain at least one of the symbols A, N, X, Z, 9, or asterisk
(*) or at least two of the symbols plus (+), minus (-), or cs.
194 Data Division