Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 26
PICTURE Clause
The following shows COBOL output for the DEPENDING ON clause:
PICTURE Clause
The PICTURE clause declares the data type and size of a single field or of a field
within a group or record definition.
picture-string
is a character string, optionally enclosed in quotation marks, that specifies the data
type and size of a field. A picture string can be alphanumeric or numeric.
Alphanumeric strings have the following form:
{ A | X | 9 }...[(length)]
Numeric strings can have any of the following forms:
[S]9...[(length)[V[9...[(length)]]]]
T[9...[(length)[V[9...[(length)]]]]]
9...[(length)[V[9...[(length)]]]]S
9...[(length)[V[9...[(length)]]]]T
X
represents any ASCII character.
A
represents any lowercase or uppercase letter of the alphabet or an ASCII
blank.
9
represents an ASCII digit, from 0 to 9.
DDL Code
COBOL Code
DEF xyz.
02 i TYPE BINARY
02 abc TYPE BINARY
OCCURS 1 to 3
TIMES
DEPENDING ON i
INDEXED BY ix.
END.
01 XYZ.
02 I NATIVE-2.
02 ABC NATIVE-2
OCCURS 1 TO 3
TIMES
DEPENDING ON I OF
XYZ
INDEXED BY IX.
PIC[TURE] ["]{picture-string }["]
{national-picture-string}