PICTURE Clause

The PICTURE clause specifies the general characteristics and editing requirements of an elementary item.

PICTURE Clause - Format

Read syntax diagramSkip visual syntax diagramPICTUREPICIScharacter-string SIZE1ISinteger-1LOCALEISmnemonic-name-1
Notes:
  • 1 IBM Extension

The PICTURE clause must be specified for every elementary item except an index data item, the subject of a LIKE, RENAMES, or TYPE clause.

The PICTURE character-string may contain a maximum of 90 characters. It consists of certain COBOL characters used as symbols. The allowable combinations determine the category of the elementary data item, except when the locale phrase is specified. A LOCALE phrase in a PICTURE clause defines a category numeric-edited item.

DECIMAL-POINT IS COMMA, when specified in the SPECIAL-NAMES paragraph, exchanges the functions of the period and the comma in PICTURE character strings and in numeric literals.

A currency symbol is presented in a PICTURE character-string by either the dollar sign ($) or by a currency symbol specified in the CURRENCY SIGN clause in the SPECIAL-NAMES paragraph.

The currency symbol represents one or more character positions into which a currency-string is to be placed.

If multiple currency symbols are defined in the program, only one of the symbols may be repeated within the same PICTURE character-string.

When a single currency symbol appears in a picture string, it is a fixed insertion symbol. The size of the edited item will be increased by the number of characters contained in the corresponding currency-string.

When a string of two or more of the same currency symbols appear in a picture string, they are being used as floating insertion symbols. The size of the edited item will be increased by the number of characters contained in the corresponding currency-string for the first currency symbol present, and by a further character for each additional currency symbol in the PICTURE character-string.

The PICTURE clause is not allowed in:
  • Descriptions of items described with USAGE IS INDEX
IBM Extension
IBM Extension
  • Internal floating-point (USAGE IS COMP-1 or USAGE IS COMP-2) data items
  • USAGE IS POINTER or USAGE IS PROCEDURE-POINTER data items
  • Date, time, or timestamp items
  • Descriptions of items containing the TYPE clause.
End of IBM Extension
End of IBM Extension