Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)
Data Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001
5-11
PICTURE Clause
Item Size
The size of a data item is determined by the symbols in its PICTURE string. Each A, X,
and 9 count as one character position. An S counts as one character only if the item is
subject to a SIGN IS SEPARATE clause.
If a data item is described as DISPLAY in a USAGE clause, the size of the item includes
the PICTURE string symbols. If the item is described as COMPUTATIONAL, the size
of the item is computed differently, as described under the USAGE clause.
Categories of Data
The PICTURE clause can describe categories of data: alphabetic, numeric,
alphanumeric, and double-byte data items. The results of most statements in the
Procedure Division depend on the categories of the data items. Some statements require
certain categories for some or all of their operands. In some cases, a statement can take
different actions depending on the category of the data items.
Table 5-1. Data Description Entry PICTURE Character-String Symbols
Symbol Meaning
A Represents a character position for a letter of the alphabet or a space character.
The symbol is counted in the size of the data item.
N Represents a double-byte character and is valid only in program units that specify
the KANJI-KATAKANA keyword in the CHARACTER-SET IS clause of the
OBJECT-COMPUTER paragraph in the Environment Division. The symbol is
counted in the size of the data item.
P Indicates scaling when the decimal point is not among or adjacent to the digits of
the data item stored. The symbol is counted in determining the maximum
number of digit positions in numeric items (the maximum is 18). One or more P
symbols can appear only as a contiguous string to the left or right of all other
digit positions in the PICTURE string. The P symbol is redundant when used
with the V symbol because P implies an assumed decimal point.
If an operation involves conversion of data from one form of internal
representation to another and the data item being converted is described with the
P symbol, each digit position described by a P is considered to have the value
zero. The size of the data item includes those digit positions.
S Represents a signed numeric value. The symbol is counted in the size of the item
only if a SIGN IS SEPARATE clause is used.
V Represents the decimal point location in noninteger numeric items. The symbol
is not counted in the size of the item.
X Represents a character position that can have any character from the ASCII
character set and/or double-byte character sets. The symbol is counted in the size
of the item.
9 Represents a character position for a digit. The symbol is counted in the size of
the item.