PICTURE and WIDEPIC attributes

The PICTURE attribute specifies the properties of a character data item by associating a picture character with each position of the data item. The WIDEPIC attribute specifies the properties of a WIDECHAR data item by associating a picture character with each position of the data item.

A picture character specifies a category of characters that can occupy that position.

Syntax

Read syntax diagramSkip visual syntax diagramPICTUREWIDEPIC'picture-specification'

Abbreviation PIC

picture-specification
Describes either a character data item or a numeric character data item. The picture specification must be followed by a picture specification. See Picture characters for character data or Picture characters for numeric character data for the valid characters.

The following rules apply to picture-specification in PICTURE:

  • A numeric picture specification specifies arithmetic attributes of numeric character data in much the same way that they are specified by the appearance of a constant.
  • Numeric character data has an arithmetic value but is stored in character form. Numeric character data is converted to coded arithmetic before arithmetic operations are performed.
  • The base of a numeric character data item is decimal. Its scale is either fixed-point or floating-point (the K or E picture character denotes a floating-point scale). The precision of a numeric character data item is the number of significant digits (excluding the exponent in the case of floating-point). Significant digits are specified by the picture characters for digit positions and conditional digit positions. The scaling factor of a numeric character data item is derived from the V or the F picture character or the combination of V and F.
  • Only decimal data can be represented by picture characters. Complex data can be declared by specifying the COMPLEX attribute along with a single picture specification that describes either a fixed-point or a floating-point data item.

You can use WIDEPIC in the same way as you use PICTURE except that the following additional rules apply to WIDEPIC:

  • The picture specification must specify an arithmetic picture, so the specification must not contain the A or X symbol.
  • The picture specification must not contain any currency symbols or overpunch symbols.

WIDEPIC'9V.99' holds the value 3.14 as WIDECHAR, not as CHAR.