The PICTURE clause describes the general characteristics and editing requirements of an elementary item.
General Format
General Rules
The categories of data that can be described with a PICTURE clause are: alphabetic, numeric, alphanumeric, alphanumeric edited,
numeric edited,


external floating-point,

and boolean.
General rules within these categories are given below:
Alphabetic Data Rules
- The PICTURE character-string can contain only the symbols "A" and "B".
The PICTURE character-string can contain only the symbol "A".
- The contents when represented in standard data format must be one or more alphabetic characters.
Numeric Data Rules
- The PICTURE character-string can contain only the symbols "9", "P", "S", and "V", and can contain up to 18 digit positions;
or:

The PICTURE character-string can contain up to 31 digit positions; or:
The PICTURE character-string can contain up to 38 digit positions.
- If unsigned, the data in standard data format must be a combination of the Arabic numerals "0", "1", "2", " 3", "4", "5",
"6", "7", "8", and "9"; if signed, the item can also contain a "+", "-", or other representation of an operational sign. (See
the topic
The SIGN Clause.)
Alphanumeric Data Rules
- The PICTURE character-string is restricted to certain combinations of the symbols " A", "X", "9", and the item is treated
as if the character-string contained all X"s. A PICTURE character-string which contains all A"s or all 9"s does not define
an alphanumeric item.
- The contents when represented in standard data format can consist of any characters in the computer's character set.
Alphanumeric Edited Data Rules
- The PICTURE character-string is restricted to certain combinations of the following symbols: "A", "X", " 9", "B", "0", and
"/" as follows:
- The character-string must contain at least one "B" and at least one "X" or at least one "0" (zero) and at least one "X" or
at least one "/" (slash) and at least one "X", or:
- The character-string must contain at least one "0" (zero) and at least one "A" or at least one "/" (slash) and at least one
"A".
- The contents when represented in standard data format can consist of any characters in the computer's character set.
Numeric Edited Data Rules
- The PICTURE character-string is restricted to certain combinations of the symbols "B", "/", "P", "V" , "Z", "0", "9", ",",
".", "*", "+", "-", "CR", "DB", and the currency symbol. The allowable combinations are determined from the order of precedence
of symbols and the editing rules as follows:
- The PICTURE character-string can contain up to 18 digit positions; or:

The PICTURE character-string can contain up to 31 digit positions; or:
The PICTURE character-string can contain up to 38 digit positions.
- The character-string must contain at least one "0" , "B", "/", "Z", "*", "+", ",", ".", "-", "CR" , "DB", or currency symbol.
- The contents of the character positions that represent a digit must be one of the numerals.
- If all character positions in the PICTURE character-string are represented by an insertion character, at least one of the
insertion characters must be positioned to the left of the decimal point.


External Floating-point Data Items
- The PICTURE string must have the following form:

A sign character must immediately precede both the significand and the exponent.
A "+" sign indicates that a positive sign will be used in the output to represent positive values and that a negative sign
will represent negative values.
A "-"sign indicates that a blank will be used in the output to represent positive values and that a negative sign will represent
negative values.
Each sign position occupies one byte of storage.
significand
The significand can contain the symbols:
9 . V
An actual decimal point can be represented with a period while an assumed decimal point is represented by a V. Either an actual
or an assumed decimal point must be present in the significand; the decimal point can be leading, embedded or trailing. The
significand can contain from 1 to 16 numeric characters.
E
Indicates the exponent.
exponent
The exponent must be a PIC "99".
- The OCCURS, REDEFINES and RENAMES clauses can be associated with external floating-point items.
- The SIGN clause is documentary only and has no effect on the representation of the sign.
- The SYNCHRONIZED clause is documentary only.
- The following clauses are invalid with external floating-point items:
BLANK WHEN ZERO JUSTIFIED VALUE
Boolean Data Rules
- The PICTURE character-string can contain only the symbol "1".
- The PICTURE character-string can contain up to 64 digit positions.
- Values can be specified in literals with an opening separator B", for example B"1110", where the value is expressed as bits.
Comments:
The size of an elementary item, where size means the number of character positions occupied by the elementary item in standard data format, is determined by the number of allowable symbols that represent character positions. An integer which is enclosed in parentheses following the symbols "A", ",", "X" , "9", "P", "Z", "*", "B", "/", "0", "+", "-", or the currency symbol indicates the number of replications of the symbol. Note that the following symbols can appear only once in a given PICTURE: "S" , "V", ".", "CR", and "DB",
The functions of the symbols used to describe an elementary item are explained as follows:
The character "P" and the insertion character "." (period) cannot both occur in the same PICTURE character-string. If, in any operation involving conversion of data from one form of internal representation to another, the data item being converted is described with the PICTURE character "P", each digit position described by a "P" is considered to contain the value zero, and the size of the data item is considered to include the digit positions so described.