Symbols Used in the PICTURE Clause

The meaning of each PICTURE clause symbol is defined in the following tables:
  • If the LOCALE phrase is not specified, see Table 1
  • If the LOCALE phrase is specified, see Table 2
The sequence in which PICTURE clause symbols must be specified is shown in:
  • Figure 1, if the LOCALE phrase is not specified
  • Figure 2, if the LOCALE phrase is specified.
More detailed explanations of PICTURE clause symbols follow the figures.

Any punctuation character appearing within the PICTURE character-string is not considered a punctuation character, but rather a PICTURE character-string symbol.

If the OPTION parameter value *NOMONOPIC, or the PROCESS statement option NOMONOPIC is specified, the currency symbol used in the PICTURE character-string is case sensitive. That is, the lowercase letters corresponding to the uppercase letters for the PICTURE symbols A, B, C, D, E, G, N, P, R, S, V, X, and Z are equivalent to their uppercase representations in a PICTURE character-string. All other lowercase letters are not equivalent to their corresponding uppercase representations.

If the OPTION parameter value *MONOPIC, or the PROCESS statement option MONOPIC is specified, all alphabetic characters in a PICTURE character-string will be converted to uppercase (monocasing).

The meaning of each PICTURE clause symbol is defined in the following list.
Symbol  
Meaning  
A
Alphabetic character or space
B
Space insertion character
P
Decimal scaling position (not counted in size of data item)
S
Operational sign (not counted in size of data item unless a SIGN clause with optional SEPARATE CHARACTER phrase is specified)
V
Assumed decimal point (not counted in size of data item)
X
Alphanumeric character (any from the EBCDIC set)
Z
Zero suppression character
IBM Extension
IBM Extension 9 End of IBM Extension
IBM Extension Numeric character End of IBM Extension
End of IBM Extension
1
Boolean character
0
Zero insertion character
Slash insertion character
,
Comma insertion character
.
Decimal point or period editing control character
+
Plus sign insertion editing control character
-
Minus sign editing control character
CR
Credit editing control character
DB
Debit editing control character or Check protect insertion character
$
Currency symbol insertion character ($ is default).
Table 1. PICTURE Clause Symbol Meanings When LOCALE Phrase NOT Specified
Symbol Meaning
A A character position that can contain only a letter of the alphabet or a space.
B A character position into which the space occupies 1 byte for non-DBCS data and 2 bytes for DBCS data.
E
IBM Extension

IBM Extension Marks the start of the exponent in an external floating-point item. It occupies 1 byte of storage. End of IBM Extension

End of IBM Extension
P An assumed decimal scaling position. It is used to specify the location of an assumed decimal point when the point is not within the number that appears in the data item. The scaling position character P is not counted in the size of the data item. Scaling position characters are counted in determining the maximum number of digit positions (63) in numeric-edited items or in items that appear as arithmetic operands. The scaling position character P may appear only as a continuous string of Ps in the leftmost or rightmost digit positions within a PICTURE character-string. Because the scaling position character P implies an assumed decimal point (to the left of the Ps, if the Ps are leftmost PICTURE characters; to the right of the Ps, if the Ps are rightmost PICTURE characters), the assumed decimal point symbol, V, is redundant as either the leftmost or rightmost character within such a PICTURE description.
In certain operations that reference a data item whose PICTURE character-string contains the symbol P, the algebraic value of the data item is used rather than the actual character representation of the data item. This algebraic value assumes the decimal point in the prescribed location and zero in place of the digit position specified by the symbol P. The size of the value is the number of digit positions represented by the PICTURE character-string. These operations are any of the following:
  • Any operation requiring a numeric sending operand.
  • A MOVE statement where the sending operand is numeric and its PICTURE character-string contains the symbol P.
  • A MOVE statement where the sending operand is numeric-edited and its PICTURE character-string contains the symbol P and the receiving operand is numeric or numeric-edited.
  • A comparison operation where both operands are numeric.

In all other operations the digit positions specified with the symbol P are ignored and are not counted in the size of the operand.

S An indicator of the presence (but not the representation nor, necessarily, the position) of an operational sign. It must be written as the leftmost character in the PICTURE string. An operational sign indicates whether the value of an item involved in an operation is positive or negative. The symbol S is not counted in determining the size of the elementary item, unless an associated SIGN clause specifies the SEPARATE CHARACTER phrase. Because hardware instructions use signs, you can improve performance by including the S in picture clauses whenever possible.
V An indicator of the location of the assumed decimal point. It may appear only once in a character string. The V does not represent a character position and, therefore, is not counted in the size of the elementary item. When the assumed decimal point is to the right of the rightmost symbol in the string, the V is redundant.
X A character position that may contain any allowable character from the EBCDIC character set.
Z A leading numeric character position; when that position contains a zero, the zero is replaced by a space character. Each Z is counted in the size of the item.
9 A character position that contains a numeral and is counted in the size of the item.
1
IBM Extension

IBM Extension A character position that contains a Boolean value of B"1" or B"0". Usage must be explicitly or implicitly defined as DISPLAY. End of IBM Extension

End of IBM Extension
0 A character position into which the numeral zero is inserted. Each zero is counted in the size of the item.
/ A character position into which the slash character is inserted. Each slash is counted in the size of the item.
, A character position into which a comma is inserted. This character is counted in the size of the item. If the comma insertion character is the last symbol in the PICTURE character-string, the PICTURE clause must be the last clause of the data description entry and must be immediately followed by the separator period.
. An editing symbol that represents the decimal point for alignment purposes. In addition, it represents a character position into which a period is inserted. This character is counted in the size of the item. If the period insertion character is the last symbol in the PICTURE character string, the PICTURE clause must be the last clause of that data description entry and must be immediately followed by the separator period.
Note: For a given program, the functions of the period and comma are exchanged if the clause DECIMAL-POINT IS COMMA is specified in the SPECIAL-NAMES paragraph. In this exchange, the rules for the period apply to the comma and the rules for the comma apply to the period wherever they appear in a PICTURE clause.

  +  
  -  
 CR
 DB

Editing sign control symbols. Each represents the character position into which the editing sign control symbol is placed. The symbols are mutually exclusive in one character string. Each character used in the symbol is counted in determining the size of the data item.
* A check protect symbol—a leading numeric character position into which an asterisk is placed when that position contains a zero. Each asterisk (*) is counted in the size of the item.
$ A character position into which a currency symbol is placed. The currency symbol in a character string is represented either by the symbol $ or by the single character specified in the CURRENCY SIGN clause in the SPECIAL-NAMES paragraph of the Environment Division. The currency symbol is counted in the size of the item.
G
IBM Extension

IBM Extension A DBCS position, occupying two bytes of storage, counting as one character. It cannot be specified for a non DBCS item. USAGE must be explicitly defined as DISPLAY-1. End of IBM Extension

End of IBM Extension
N
IBM Extension
IBM Extension
  • If usage is explicitly defined as NATIONAL, a national (UCS-2 or Unicode) character position.
  • If usage is explicitly defined as DISPLAY-1, a DBCS position that occupies two bytes of storage counting as one character.
  • If the USAGE clause is not specified for an elementary item, or for any group to which the data item belongs, the following rules apply:
    • If the NATIONAL compiler option is in effect, USAGE NATIONAL is implied.
    • Otherwise, USAGE DISPLAY-1 is implied.
End of IBM Extension
End of IBM Extension
Table 2. PICTURE Clause Symbol Meanings When LOCALE Phrase IS Specified
Symbol Meaning
9 A character position that contains a numeral and is counted in the number of numerals that may appear in the edited item.
. An editing symbol that represents the decimal point for alignment purposes. If the period insertion character is the last symbol in the PICTURE character string, the PICTURE clause must be the last clause of that data description entry and must be immediately followed by the separator period. The decimal point character used at runtime is taken from the locale.
Note: For a given program, the functions of the period and comma are exchanged if the clause DECIMAL-POINT IS COMMA is specified in the SPECIAL-NAMES paragraph. In this exchange, the rules for the period apply to the comma and the rules for the comma apply to the period wherever they appear in a PICTURE clause.

  +

Editing sign control symbol. The + indicates that the edited item is to be signed in accordance with the specified locale. If + is not specified, the edited item will be unsigned.
cs The currency symbol in the character string indicates that the edited item is to include the currency string associated with the specified locale.

Figure 1 shows the sequence in which PICTURE clause symbols must be specified if the LOCALE phrase is not specified. See the notes at the end of the figure. Figure 2 shows the sequence in which PICTURE clause symbols must be specified if the LOCALE phrase is specified.

Figure 1. PICTURE Clause Symbol Sequence When LOCALE Phrase NOT Specified
PICTURE Clause Symbol Sequence When LOCALE Phrase NOT Specified
Notes to Figure 1:
  1. An X at an intersection indicates that the symbol(s) at the top of the column may, in a given character-string, appear anywhere to the left of the symbol(s) at the left of the row.
  2. The $ character, however it is represented in the appropriate character set, is the default value for the currency symbol.
  3. At least one of the symbols A, X, Z, 9, or *, or at least two of the symbols +, -, or $ must be present in a PICTURE string.
  4. IBM Extension
    IBM Extension The symbols G or N can appear alone in the PICTURE character-string. End of IBM Extension
    End of IBM Extension
  5. Nonfloating insertion symbols + and -, floating insertion symbols Z, *, +, -, and $, and the symbol P appear twice in the above PICTURE character precedence table. The leftmost column and uppermost row for each symbol represents its use to the left of the decimal point position. The second appearance of the symbol in the table represents its use to the right of the decimal point position. ({ }) indicate items that are mutually exclusive.
  6. Braces ({}) indicate items that are mutually exclusive.
IBM Extension
IBM Extension
Figure 2. PICTURE Clause Symbol Sequence When LOCALE Phrase Specified
This figure illustrates the PICTURE CLAUSE symbol sequence when the LOCALE phrase is specified: LOCPCSS
  End of IBM Extension
End of IBM Extension