COBOL Manual for TNS and TNS/R Programs
Data Division
HP COBOL Manual for TNS and TNS/R Programs—522555-006
7-56
PICTURE Clause
P No, but
determines the
maximum
number of digit
positions in
numeric and
numeric edited
items.
Indicates scaling when the decimal point is not within the
number that appears in the data item.
One or more P s can appear only as a string of contiguous
characters to the left or right of all other digit positions in the
character-string.
Because P implies an assumed decimal point, V is
redundant.
P and the insertion character period (.) cannot be in the same
character-string.
In some operations that manipulate a data item whose
character-string contains P, the algebraic value of the
data item is used rather than the actual character
representation of the data item. In this algebraic value, the
decimal point is in the prescribed location and zero is in each
digit position specified by P. The size of the value is the
number of digit positions represented by the character-
string. These operations are any of:
•
Any operation requiring a numeric sending operand
•
A MOVE statement where the sending operand is a
numeric or numeric-edited data item, its character-
string contains P, and the receiving operand is
numeric or numeric-edited
•
A comparison operand where both operands are numeric
In all other operations, the digit positions specified with P are
ignored.
S Only if you use
a SIGN clause
with a
SEPARATE
phrase
Indicates that the picture string represents a signed numeric
value. Only one S can appear in a character-string. If
present, it must be the leftmost character. If no S is present,
the item is unsigned. A negative value becomes positive if it is
stored in an item that does not have an S.
The location (leading or trailing) and representation
(embedded or separate) attributes are specified in other
clauses of the data description entry, not in the PICTURE
clause (see SIGN Clause
).
V No Represents the assumed decimal point location in noninteger
numeric items. Only one V can appear in a character-
string, and V cannot occur in the same character-
string with an explicit decimal point.
X Yes Represents a character position that can contain any
character from the ASCII character set.
Table 7-2. PICTURE Character-String Symbols (page 2 of 3)
Symbol
Symbol Counts
in Item’s Size Description