13.18.40 PICTURE clause

13.18.40.1 General

The PICTURE clause describes the General characteristics, editing requirements, and format validation profile of an elementary item.

13.18.40.2 General formats

Format 1 (basic):

{ PICTURE PIC } IS character-string-1 [ EDITING character-1 { IS literal-1 FOR {| NEGATIVE IS literal-2 POSITIVE IS literal-3 |} } ]

Format 2 (locale):

{ PICTURE PIC } IS character-string-1 LOCALE [ IS locale-name-1 ] SIZE IS integer-1

13.18.40.3 Syntax rules

ALL FORMATS
  1. The PICTURE clause may be specified only at the elementary level.
  2. Character-string-1 shall consist of an allowable combination of characters used as picture symbols.

    The allowable combinations of symbols for a PICTURE clause are specified in 13.18.40.6, Precedence rules.

    NOTE 1 The currency symbol can be selected from the set of allowable characters from the computer's compile-time coded character set. All picture symbols other than the currency symbol are from the COBOL character repertoire.

  3. The equivalence between uppercase and lowercase letters appearing as occurrences of a currency symbol in character-string-1 is as specified in 12.3.7, SPECIAL-NAMES paragraph, Syntax rule 20. The equivalence between uppercase and lowercase letters appearing as picture symbols other than currency symbols in character-string-1 is as specified in 8.1.3, COBOL character repertoire, General rule 3.
  4. The maximum number of characters allowed in character-string-1 is 63.
  5. PIC is an abbreviation for PICTURE.
  6. An unsigned nonzero integer that is enclosed in parentheses indicates the number of consecutive occurrences of the symbol that immediately precedes the left parenthesis. The integer may be specified by a constant-name, in which case the length of the integer, not the length of the constant-name, is counted toward the maximum number of characters in character-string-1.
  7. If the symbol ',' or the symbol '.' is the last symbol of character-string-1, the PICTURE clause shall be the last clause of the data description entry and shall be followed immediately (without an intervening separator space) by the separator period.
FORMAT 1
  1. Character-1 shall be any basic letter in the COBOL character set except those specified in a CURRENCY SIGN clause or a basic letter character A, B, C, D, E, N, P, R, S, V, X, Z or their lowercase equivalents.
  2. If USAGE IS NATIONAL is specified for the subject of the entry or if character-string-1 contains the symbol 'N', literal-1, literal-2, and literal-3 shall be national literals. Otherwise, literal1, literal-2, and literal-3 shall be alphanumeric literals. The total number of characters in literal-1, literal-2, or literal-3 shall not exceed 50.
  3. If the EDITING phrase is specified, the character identified by character-1 shall appear at least once in character-string-1
  4. If more than one EDITING phrase is specified in one PICTURE clause, no two instances of character-1 shall be the same character.
  5. If literal-1 is specified, character-1 is a fixed editing sign control symbol. If the FOR phrase is specified, character-1 is an extended editing sign control symbol, character-1 is limited to numeric or numeric-edited data items, and the following rules apply:

    1. Literal-2 and literal-3 shall occupy the same number of character positions.
    2. Character-string-1 shall contain character-1 and only the symbols ‘9’, ‘.’, the currency symbol, ‘P’, ‘V’, or ‘Z’.
    3. If only POSITIVE is specified, the default character for the unspecified phrase is the space character repeated for the number of characters in literal-2. If only NEGATIVE is specified, the default character for the unspecified phrase is the space character repeated the number of characters in literal-3.
    4. No editing sign control symbols may be specified in character-string-1. Extended editing sign control symbols shall not be specified for a floating-point edited item.

    If the FOR phrase is not specified, the following rules apply:

    1. Character-string-1 shall contain:

      • at least on one of the symbols from the set ‘A’, ‘N’, ‘X’, ‘Z’, ‘1’, ‘9’, ‘*’, or
      • at least two occurrences of one of the symbols from the set character-1, ‘x’, ‘+’, ‘-’, and the currency symbol.
    2. Each of the symbols from the set ‘CR’, ‘DB’, ‘E’, ‘S’, ‘V’ ‘.’ may appear only once in character-string-1.
    3. NOTE 2 The symbols ‘CR’ and ‘DB’ although consisting of two characters, are each considered to be a symbol by itself.

  6. When the DECIMAL-POINT IS COMMA clause is specified, the symbol comma is the decimal separator and the symbol period is the grouping separator. The rules for the symbol period apply to the symbol comma, and the rules for the symbol comma apply to the symbol period.
  7. For data items of category numeric, and for fixed-point data items of category numeric-edited, the number of digit positions described by character-string-1 shall range from 1 through 31.
  8. For floating-point data items of category numeric-edited, the number of digit positions in the significand shall range from 1 through 36
  9. The symbol 'P' may appear only as a continuous string of 'P's in the leftmost or rightmost digit positions in character-string-1.
  10. The symbol 'P' and the symbol '.' are mutually exclusive in character-string-1.
  11. The symbol 'S', if present, shall be the first symbol in character-string-1.
  12. When the symbol 'V' and one or more symbols 'P' are used in character-string-1, the symbol 'V' shall either immediately precede the first symbol 'P' or immediately follow the last symbol 'P'.
  13. The symbol 'V' and the symbol '.' are mutually exclusive in character-string-1.
  14. The symbol 'Z' and the symbol '*' are mutually exclusive in character-string-1.
  15. Neither the symbol 'S' nor the symbol '*' shall be specified in character-string-1 when the BLANK WHEN ZERO clause is specified for the subject of the entry.
  16. The editing sign control symbols '+', '-', 'CR', and 'DB' are mutually exclusive in character-string-1 with the exception of a numeric-edited data item for a floating-point edited result as described in General rule 13b.

    NOTE 3 For a floating-point edited result, the significand part of the character-string may contain a '-' symbol and the exponent part always contains a '+' symbol.

  17. For fixed insertion with editing sign control symbols, only one currency symbol and only one editing sign control symbol may be used in character-string-1. For extended editing sign control symbols, either one or two extended editing sign control symbols may be used in character-string-1.
  18. The symbol '+' or the symbol '-', when used, shall be either the leftmost or the rightmost symbol in character-string-1. When extended editing sign control symbols are used and two are specified, the first occurrence of the EDITING phrase shall be for the leftmost symbol in character-string-1 and the second occurrence shall be for the rightmost symbol in character-string-1.
  19. For fixed editing sign control, the currency symbol, when used, shall be either the leftmost symbol in character-string-1, optionally preceded by one of the symbols '+' or '-', or the rightmost symbol in character-string-1, optionally followed by one of the symbols '+', '-', 'CR', or 'DB'. For extended editing sign control, the currency symbol when used shall be either the leftmost symbol in character-string-1, optionally preceded by character-1, or the rightmost symbol in character-string-1 optionally followed by character-1.

    NOTE 4 This means that the following are valid picture character-strings:

    $999+'
    '+999$'
    '+$999'
    '999$+'
    '+$$99'
    '$$99+

  20. No more than one of the following may be specified in character-string-1:

    • a string of two or more symbols '+';
    • a string of two or more symbols '-';
    • a string of two or more currency symbols;
    • a string of one or more symbols '*';
    • a string of one or more symbols 'Z'.

    NOTE 5 This means, for example, that the picture character-string +$$$ is valid, but that the picture character-string +++$$$ is invalid.

  21. For floating insertion, when the currency symbol is used as the floating insertion symbol, all occurrences of the currency symbol within character-string-1 shall be equivalent characters.
  22. For floating insertion, at least one insertion symbol shall be specified to the left of the decimal point position.
  23. The symbols 'A' and 'X' shall not be specified in character-string-1 when a USAGE NATIONAL clause is specified for the subject of the entry.
  24. The symbol 'S' shall not be specified in character-string-1 when the NO SIGN phrase of the USAGE Clause is specified for the subject of the entry.
FORMAT 2
  1. A format 2 PICTURE clause shall not be specified in a data item described with the CONSTANT RECORD clause, or in any data item subordinate to a data item described with the CONSTANT RECORD clause.
  2. Character-string-1 shall contain at least one of the symbols 'Z' or '9'.
  3. Each of the symbols from the set '+', '.', the currency symbol may appear only once in character-string-1.
  4. The number of digit positions described by character-string-1 shall range from 1 through 31.
  5. The currency symbol and the symbol '+' may be specified only to the left of the decimal point position.
  6. Locale-name-1 shall be specified in the LOCALE clause in the SPECIAL-NAMES paragraph.

13.18.40.4 General rules

ALL FORMATS
  1. When the usage of the subject of the entry is national, each symbol representing a character position defines a national character position. When the usage of the subject of the entry is display, each symbol representing a character position defines an alphanumeric character position.
  2. The value of insertion and replacement characters in a resultant edited item is the value of those characters in the computer's runtime coded character set. When the usage of the item being edited is national, the value is the national character representation; otherwise, the value is the alphanumeric character representation.
FORMAT 1
  1. A PICTURE clause defines the subject of the entry to fall into one of the following categories of data:

    • alphabetic
    • alphanumeric
    • alphanumeric-edited
    • boolean
    • national
    • national-edited
    • numeric
    • numeric-edited

    A BLANK WHEN ZERO clause specified for the subject of the entry defines the item as numeric-edited.

  2. The size in boolean positions or character positions of an elementary data item that has been defined with a PICTURE clause is determined by the number of symbols in character-string-1 that represent either boolean positions or character positions.
  3. To define an item as alphabetic, character-string-1 shall contain only one or more occurrences of the symbol 'A'.
  4. To define an item as alphanumeric, character-string-1 shall contain a combination of symbols from the set 'A', 'X', and '9', that includes

    • at least one symbol 'X', or
    • at least two different symbols from this set.
  5. To define an item as alphanumeric-edited, character-string-1 shall include

    • at least one symbol 'A' or one symbol 'X', and
    • at least one instance of character-1 or one of the symbols from the set 'B', '0', '/'.
  6. To define an item as boolean, character-string-1 shall contain only one or more occurrences of the symbol '1'.
  7. To define an item as national, character-string-1 shall contain only one or more occurrences of the symbol 'N'.
  8. To define an item as national-edited, character-string-1 shall include

    • at least one symbol 'N', and
    • at least one instance of character-1 or one of the symbols from the set 'B', '0', '/'.
  9. To define an item as fixed-point numeric, character-string-1

    • shall include at least one symbol '9', and
    • may contain a combination of symbols from the set 'P', 'S', and 'V'.
  10. In the following general rules, for a PICTURE clause with the FOR phrase all references to ‘+’ apply to POSITIVE is literal-2, and all references to ‘-’ apply to NEGATIVE IS literal-3 unless otherwise indicated.
  11. To define an item as numeric-edited, one of the following options shall be specified:

    1. To define a fixed-point numeric-edited item, character-string-1 shall include:

      • at least one symbol 'Z'; or
      • at least one symbol '*'; or
      • at least two identical symbols from the set '+', '-', currency symbol; or
      • at least one symbol '9' and at least one instance of character-1 or at least one of the symbols from the set 'B', 'CR', 'DB', '0', '/', ',', '.', '+', '-', the currency symbol.
    2. To define a floating-point numeric-edited item, characters-string-1 shall consist of two parts, separated without any spaces, by the symbol 'E'. The first part represents the significand; the second part represents the exponent.

      The significand shall be a valid character-string for either a numeric item or a numeric-edited item for a fixed-point result. Neither floating insertion editing nor zero suppression with replacement shall be specified for the significand.

      The exponent shall be '+9', '+99', '+999', '+9999', or '+9(n)' where n = 1, 2, 3, or 4.

  12. The meaning of the symbols used in character-string-1 are as follows:

    A

    Each symbol 'A' represents a character position that shall contain any character from the computer's alphanumeric character set. Each symbol 'A' is counted in the size of the item.

    The characters represented may be graphic characters or non-graphic characters.

    NOTE 1 The symbol ‘A’ is equivalent to the symbol ‘X’ except within the execution of a VALIDATE statement. The meaning of the symbol ‘A’ within the VALIDATE statement is specified in General rule 15, below.

    B
    Each symbol 'B' represents a character position into which the character space will be inserted during editing. Each symbol 'B' is counted in the size of the item.
    E

    The symbol 'E' represents a character position into which the character 'E' will be inserted during editing. The symbol 'E' is counted in the size of the item.

    The symbol 'E' is used to separate the significand and the exponent of a floating-point numeric-edited item.

    N
    Each symbol 'N' represents a national character position that shall contain a character from the computer's national character set. Each symbol 'N' is counted in the size of the item.
    P

    The symbol 'P' specifies the location of an assumed decimal point when that point is not within the number that appears in the data item. The symbol 'P' is not counted in the size of the item, but each symbol 'P' is counted in the maximum number of digit positions.

    The symbol 'P' implies an assumed decimal point that is either

    • to the left of the string of 'P's if they indicate the leftmost digit positions in character-string-1; or
    • to the right of the string of 'P's if they indicate the rightmost digit positions in character-string-1.

    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 value of the data item. This algebraic value assumes the decimal point in the prescribed position and zero in place of each digit position specified by the symbol 'P'. The size of the value is the number of digit positions represented by the picture character-string.

    The operations that use the algebraic value are the following:

    1. Any operation requiring a numeric sending operand.
    2. An elementary move operation where the sending operand is numeric and its picture character-string contains one or more symbols 'P'.
    3. A move operation where the sending operand is numeric-edited, its picture character-string contains one or more symbols 'P', and the receiving operand is numeric or numeric-edited.
    4. 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
    The symbol 'S' indicates the presence, but neither the representation nor, necessarily, the position of an operational sign. For usages display and national, the symbol 'S' is counted in the size of the item only when the subject of the entry is described with a SIGN clause with the SEPARATE phrase. For other numeric usages, the effect of the 'S' is described in the rules for the USAGE clause.
    V

    The symbol 'V' indicates the position of the assumed decimal point for alignment purposes. The symbol 'V' is not counted in the size of the item.

    When the assumed decimal point position is to the right of the rightmost digit position, the symbol 'V' is redundant.

    X

    Each symbol 'X' represents a character position that shall contain any character from the computer's alphanumeric character set. Each symbol 'X' is counted in the size of the item.

    The characters represented may be graphic characters or non-graphic characters.

    Z
    Each symbol 'Z' represents a leading numeric position that during editing will contain a numeric character in the range 0 through 9, or a character space when the content of that position is a leading zero. Each symbol 'Z' is counted in the size of the item.
    0
    Each symbol '0' (zero) represents a character position into which the character zero will be inserted during editing. Each symbol '0' is counted in the size of the item.
    1
    Each symbol '1' represents a boolean position that shall contain a boolean character. Each boolean character can be represented in storage as a bit, an alphanumeric character, or a national character. Each symbol '1' is counted in the size of the item.
    9
    Each symbol '9' represents a decimal digit position of the value of the item. For usages display and national, each '9' represents a character position that shall contain a numeric character in the range 0 through 9 with the possible inclusion of an operational sign; each '9' is counted in the size of the item. For other numeric usages, the effect of the number of '9's is described in the rules for the USAGE clause.
    /
    Each symbol '/' (slant) represents a character position into which the character slant will be inserted during editing. Each symbol '/' is counted in the size of the item.
    ,
    Each symbol ',' (comma) represents a character position into which the character comma will be inserted during editing. Each symbol ',' is counted in the size of the item.
    .

    The symbol '.' (period) represents a character position into which the character period will be inserted during editing. The symbol '.' is counted in the size of the item.

    In addition, the symbol '.' indicates the decimal point position for alignment purposes.

    + – CR DB
    These symbols represent the character position(s) into which the editing sign control character(s) is (are) placed during editing. Each character used in the symbol is counted in the size of the item.
    *
    Each symbol '*' represents a leading numeric position that during editing will contain a numeric character in the range 0 through 9, or a character asterisk when the content of that position is a leading zero. Each symbol '*' is counted in the size of the item.
    cs

    A currency symbol represents character positions into which the currency string will be placed during editing. A currency symbol is represented in character-string-1 either by the currency sign or by the currency symbol specified in a CURRENCY SIGN clause in the SPECIAL-NAMES paragraph.

    The first occurrence of the currency symbol adds the number of characters in the currency string to the size of the item. Each subsequent occurrence of the currency symbol adds one to the size of the item.

    es

    Character-1 in character-string-1 represents a character position into which the associated literal-1, literal-2, or literal-3 is to be placed. If character-1 is a simple insertion symbol or a fixed insertion symbol, the size of literal-1 is counted in the size of the item. For fixed editing sign control symbols, each character used in the symbol is counted in the size of the item. For extended editing sign control symbols with fixed insertion, each occurrence of the character(s) specified in the associated literal are counted in the size of the item. For floating inserting, one occurrence of literal-2 or literal-3 is counted in the size of the item plus one character for each repetition of character-1.

    NOTE 2 If reference modification is used to reference part of a data item described with floating extended editing sign control symbols, care is needed to account for the repetitions.

  13. The PICTURE clause takes effect during the format validation stage of the execution of a VALIDATE statement that refers directly or indirectly to the subject of the entry.

    [Validation rules omitted.]

FORMAT 2
  1. Format 2 of the PICTURE clause defines the item to be fixed-point numeric-edited.
  2. The number of character positions in the item is specified by integer-1.
  3. The meaning of the symbols used in character-string-1 are as follows:

    Z
    Each symbol 'Z' represents a leading numeric position that during editing will contain a numeric character in the range 0 through 9, or a character space when the content of that position is a leading zero.
    9
    Each symbol '9' represents a digit position that shall contain a numeric character in the range 0 through 9.
    .

    The symbol '.' (period) represents a character position into which the decimal separator taken from the locale will be inserted during editing.

    In addition, the symbol '.' indicates the decimal point position for alignment purposes.

    +
    The symbol '+' indicates that the item is to be signed in accordance with the specifications in the locale. If the symbol '+' is not specified, the item will be unsigned.
    cd
    The currency symbol indicates that the item is to include a currency string in accordance with the specifications in the locale.
  4. The PICTURE clause takes effect during the format validation stage of the execution of a VALIDATE statement that refers directly or indirectly to the subject of the entry. The validation is carried out in accordance with the character classification and monetary specification in the locale.

13.18.40.5 Editing rules

FORMAT 1
  1. There are two methods of performing editing: either insertion or suppression with replacement.

    There are four types of insertion editing:

    • simple insertion
    • special insertion
    • fixed insertion
    • floating insertion

    There are two types of suppression with replacement:

    • zero suppression with replacement with spaces
    • zero suppression with replacement with asterisks
  2. The type of editing that may be performed upon an item is dependent upon the category to which the item belongs. Table 7, Category and type of editing, specifies which type of editing may be performed upon a given category:

    Table 7 — Category and type of editing
    Category Type of editing
    Alphabetic None
    AlphanumericNone
    BooleanNone
    NationalNone
    NumericNone
    Alphanumeric-editedSimple insertion
    National-editedSimple insertion
    Numeric-edited (fixed-point edited result)All
    Numeric-edited (floating-point edited result)Simple insertion, special insertion, and fixed
    insertion for the significand part
    None for the exponent part
  3. Simple insertion editing

    Character-1 and the symbols 'B', '0', '/', ',' and, if literal-1 is specified, character-1 are used as the simple insertion editing symbols.

    Simple insertion editing results in the insertion character occupying the same character position in the edited item as the associated symbol occupies in character-string-1.

  4. Special insertion editing

    The symbol '.' is used as the special insertion editing symbol.

    Special insertion editing results in the period character occupying the same character position in the edited item as the symbol '.' occupies in character-string-1.

  5. Fixed insertion editing

    Character-1, the currency symbol and the editing sign control symbols '+', '-', 'CR' and 'DB' are used as the fixed insertion editing symbols.

    Fixed insertion editing results in the insertion character(s) occupying the same character position(s) in the edited item as the associated symbol occupies in character-string-1.

    When character-1 is used, and is not a simple insertion character, it represents literal-2, or literal-3 as the insertion characters.

    Table 8, Results of fixed insertion editing, shows the character(s) produced by an editing sign control symbol, depending on the value of the data item.

    Table 8 — Results of fixed insertion editing
    Editing symbol Result
    Positive or zero value Negative value
    ++
    space
    CR2 spacesCR
    DB2 spacesDB
    character-1, NEGATIVE phraseliteral-2literal-2 or spaces
    character-1, POSITIVE phraseliteral-3 or spacesliteral-3
    Literal-2 or literal-3 or spaces means one instance of literal-2 or literal-3 or as many spaces as there are characters in literal-2 or literal-3.

    The uppercase letters CR and DB are the insertion characters for the insertion symbols 'CR' and 'DB'.

  6. Floating insertion editing

    The currency symbol, the extended editing sign control symbols, if specified, and the fixed editing sign control symbols '+' and '-' are used as the floating insertion symbols.

    Floating insertion editing is indicated by specifying a string of at least two identical floating insertion editing symbols. Any of the simple insertion editing symbols embedded in this string or to the immediate right of this string are part of the string.

    The leftmost symbol of the insertion string represents the leftmost limit of the floating characters in the data item. The rightmost symbol of the insertion string represents the rightmost limit of the floating characters in the data item.

    The second floating symbol represents the leftmost limit of the numeric data that may be stored in the item. During editing, nonzero numeric characters may replace all the insertion symbols at or to the right of this limit.

    If truncation occurs, the value of the data that is used for editing is the value after truncation as specified in 14.6.8, Alignment and transfer of data into data items

    NOTE 1 If the size of character-string-1 is not at least the number of characters in the sending operand, plus the number of non-floating insertion symbols to be inserted in the item, plus one. unwanted truncation of data can result.

    There are two ways of representing floating insertion editing:

    1. One way is to represent any or all of the leading numeric character positions to the left of the decimal point position by the same insertion symbol. The result is that a single occurrence of the replacement character(s) is (are) placed into the character position(s) immediately preceding whichever of the following is encountered first:

      • the first nonzero numeric character in the item
      • the first character position for which no floating insertion editing is specified
      • the decimal point position.

      Any character positions preceding this (these) insertion character(s) will contain the space character.

    2. The second way is to represent all of the numeric character positions by the same insertion symbol. The result depends upon the value of the data to be stored. If the value is not zero, the result is the same as if the floating insertion editing were defined only to the left of the decimal point position. If the value is zero, all character positions will contain the space character.

    Table 9, Results of floating insertion editing, shows the character produced by the floating editing sign control symbols ‘es’, '+' and '-', depending on the value of the data item.

    Table 9 — Results of floating insertion editing
    Editing symbol in
    picture
    character-string
    Result
    Data item
    positive or zero
    Data item
    negative
    ++
    space
    character-1 NEGATIVE phraseliteral-2 or spacesliteral-2
    character-1 POSITIVE phraseliteral-3literal-3 or spaces
  7. Zero suppression with replacement editing

    The symbols 'Z' and '*' are used as the symbols for zero suppression with replacement. If the symbol 'Z' is used, the replacement character is the character space; if the symbol '*' is used, the replacement character is the character asterisk.

    Zero suppression with replacement is indicated by specifying a string of one or more identical zero-suppression characters. Any of the simple insertion editing symbols embedded in this string or to the immediate right of this string are part of the string.

    There are two ways of representing zero suppression with replacement:

    1. One way is to represent any or all of the leading numeric character positions to the left of the decimal point position by the zero-suppression symbol. The result is that the corresponding replacement character is placed into any character position immediately preceding whichever of the following is encountered first:

      • the first nonzero numeric character in the item
      • the first character position for which no zero suppression with replacement is specified
      • the decimal point position.
    2. The second way is to represent all of the numeric character positions by the zero-suppression symbol. The result depends upon the value of the data to be stored. If the value is not zero, the result is the same as if the zero suppression with replacement were defined only to the left of the decimal point position. If the value is zero and the zero-suppression symbol is the symbol 'Z', all character positions of the item will contain the character space. If the value is zero and the zero-suppression symbol is the symbol '*', all character positions of the item will contain the character asterisk, but the decimal separator, when specified, will appear in the item.
  8. Zero value of a floating-point edited item

    If the value to be edited into a floating-point edited item is zero, then after editing all digit positions of the significand and all digit positions of the exponent shall be zero; the sign of the significand, if present, shall be positive; and the sign of the exponent shall be positive.

FORMAT 2

[Editing rules 9–15 omitted.]

13.18.40.6 Precedence rules

Where an 'x' appears in Table 10 and in Table 11, additional syntax rules or general rules may apply further restrictions.

FORMAT 1

Table 10, Format 1 picture symbol order of precedence, shows the order of precedence of symbols in a Format 1 picture character-string. An 'x' at an intersection indicates that the symbol(s) at the top of the column may precede (but not necessarily immediately) in character-string-1 the symbol(s) at the left of the row. The currency symbol is indicated by the symbol 'cs'.

The currency symbol when used as a fixed insertion symbol appears in two columns and two rows. The leftmost column and the uppermost row for this symbol represent its use as the first or second symbol in character-string-1. The rightmost column and the lowermost row for this symbol represent its use as the last or penultimate symbol in character-string-1.

The symbol '+' that appears in a column and in a row by itself, represents its use in the exponent part of character-string-1 for a floating-point numeric-edited item.

The symbols '+' and '–' when used as a non-floating insertion symbol appear in two columns and two rows. The leftmost column and the uppermost row for these symbols represent their use as the first symbol in character-string-1. The rightmost column and the lowermost row for these symbols represent their use as the last symbol in character-string-1.

The symbol 'P', the currency symbol when used as a floating insertion symbol, the pair of zero-suppression symbols 'Z' and '*', and the pair of floating insertion symbols '+' and '–' appear in two columns and in two rows in Table 10. The leftmost column and the uppermost row for these symbols represent their use to the left of the decimal point position. The rightmost column and the lowermost row for these symbols represent their use to the right of the decimal point position.

For the purposes of Table 10, character-string-1 for a numeric-edited item for a floating-point edited result is considered as two separate strings, the first of which begins with the first symbol and ends with the symbol 'E', and the second of which begins with the symbol 'E' and ends with the last symbol. The presence of symbols preceding the symbol 'E' has no effect on the validity of symbols following the symbol 'E'.

When the DECIMAL-POINT IS COMMA clause is specified, the precedence rules for the symbols comma and period are interchanged.

Table 10 — Format 1 picture symbol order of precedence
Second
Symbol
First Symbol
Simple, special, and fixed
insertion symbols
Zero-suppression
and floating
insertion symbols
Other symbols
B
0
/
, . + +
+
C
R
D
B
c
s
c
s
Z
*
Z
*
+
+
c
s
c
s
9 A
X
S V P P 1 N E
Simple, special, and fixed insertion symbols B 0 / xxx x x xxxxxxxx x x x
, xxx x x xxxxxxx x x
. xx x x x x xxx
+ x
+
+
xxx xxxx xxx xxx
CR
DB
xxx xxxx xxx xxx
cs x
cs xxx x xx x xxx
Zero-suppression and floating insertion symbols Z
*
xx x x x
Z
*
xxx x x xx x x
+
xx x x
+
xxx x xx x
cs xx x x
cs xxx x xx x
Other symbols 9 xxxxx x x x x xxxx x x
A
X
x xx
S
V xx x x x x x x x x
P xx x x x x x x x x
P x x xx x
1 x
N x x
E xxx x x

If the EDITING phrase is specified, the precedence of ‘es’ as related to Table 10, Format 1 picture symbol order of precedence, has the same precedence as the 'cs' symbol in the column and row of non-floating insertion symbols.

FORMAT 2

Table 11, Format 2 picture symbol order of precedence, shows the order of precedence of symbols in a Format 2 picture character-string. An 'x' at an intersection indicates that the symbol at the top of the column may precede (but not necessarily immediately) in character-string-1 the symbol at the left of the row. The currency symbol is indicated by the symbol 'cs'.

Table 11 — Format 2 picture symbol order of precedence
Second
Symbol
First Symbol
9 cs . + Z
9 XXXXX
cs X
. XX XX
+
Z XXXX