COBOL Manual for TNS and TNS/R Programs
Data Division
HP COBOL Manual for TNS and TNS/R Programs—522555-006
7-57
PICTURE Clause
Z Yes Represents a leading numeric character position whose
contents are to be replaced by a space when it and all
preceding numeric character positions are 0. All Zs must
precede any 9 s within the character-string.
9 Yes Represents a character position for a digit.
0 Yes Represents a character position where the character zero (0 )
is to be inserted.
, Yes Represents a character position where a comma (,) is to be
inserted. A comma must not be the last (rightmost) character
in the character-string. See note below.
. Yes Represents the decimal point for alignment purposes. A
period (.) is to be inserted at that position. The period must
not be the last (rightmost) character in the character-
string and can only be used once. No V can occur in a
PICTURE character-string containing an explicit
decimal point.
/ Yes Represents a character position where a slash (/) is to be
inserted.
+
-
CR
DB
Yes Sign-editing symbols. A character-string cannot have
more than one sign-editing symbol. If it has one sign-editing
symbol, the sign-editing symbol represents the position where
the sign-control symbol goes.
* Yes Represents a leading numeric character position that is to be
replaced by an asterisk (*) if its contents and the contents of
all preceding numeric character positions are 0. All asterisks
must precede any 9 s.
$ Yes 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.
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
Table 7-2. PICTURE Character-String Symbols (page 3 of 3)
Symbol
Symbol Counts
in Item’s Size Description