Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)

Data Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual426750-001
5-12
PICTURE Clause
In the discussion that follows, 9 and A symbols within the PICTURE string are
described as representing character positions that have only numbers or letters and
spaces. For reasons of efficiency, the SCREEN COBOL compiler does not always
require this restriction. Characters other than those permitted can be moved into these
positions if they appear in the corresponding group positions of a sending data item.
SCREEN COBOL considers every group item to be alphanumeric. Manipulations on
group items ignore all PICTURE strings. For example, a move operation into a group
item can cause any position of an item to contain any ASCII character.
Alphabetic Data
An alphabetic data item can have only A symbols in the PICTURE string. The contents
of this type of item are represented externally as some combination of the 26 letters of
the alphabet and the space character.
The following examples illustrate alphabetic data:
05 package-code PIC AAA.
05 dept-id PIC AA(6)AA.
05 dept-code PIC AA(2)AA.
Numeric Data
A numeric data item can have 9, P, S, and V symbols in the PICTURE string. The
number of digits described must be greater than zero but not more than 18. The contents
of this type of item are represented externally as a combination of digits 0 through 9.
If the item is signed, a plus or minus is included when the data is moved to a screen
item, or when a SIGN IS SEPARATE clause is specified. In all other instances, the sign
is encoded within one of the digits.
The following examples illustrate numeric data:
05 division-total PIC S9(10)V99.
05 fraction-amount PIC PP99.
Alphanumeric Data
An alphanumeric data item can have combinations of A, X, and 9 symbols in the
PICTURE string, but the item is treated as though the string contained all X symbols.
The length of the item must be greater than zero but not more than 32,000 bytes. The
contents of the item can be any combination of ASCII characters. A PICTURE string of
all A symbols or all 9 symbols is not an alphanumeric item.
The following examples illustrate alphanumeric data:
10 stock-item-name PIC X(25).
10 zone-id PIC A(4)99.
Double-Byte Data
A double-byte data item that allows only double-byte data contains only N symbols in
the PICTURE string.