Data Categories

The following table shows the data categories handled by the extended ACCEPT statement. These data categories are also supported by the extended DISPLAY statement. (The extended ACCEPT and DISPLAY statements do not support data items with scaling positions in the PICTURE clause.)

Table 1. Data Categories Handled by Extended ACCEPT
Category Initial Display Entering Data Data Item Updated
Alphabetic A, B, C D B, C
Numeric (internal, binary, decimal or packed decimal) B, C, E, F, F1, F2 D, G, H O
Numeric (zoned decimal) B, C, F, F1, F2 D, G, H O
Numeric-edited A, I J, H K, O
Alphanumeric A, B, C D B, C
Alphanumeric-edited A, I J L
Boolean A, B, C D, M, N B, C
DBCS A, B, C D B, C
DBCS-edited A, B, C D B, C, L
Internal floating-point A, I, I1, P Q O
External floating-point A, I, I1 Q O
A
Left justified (by default).
B
For RIGHT-JUSTIFY, trailing spaces and hexadecimal zeros are removed, and data is moved to the rightmost position.
C
For ZERO-FILL, trailing spaces and hexadecimal zeros are converted to zeros if data is left-justified. Leading spaces are converted to zeros if data is right-justified.

If only SPACE-FILL is specified, trailing hexadecimal zeros are converted to spaces.

D
If RIGHT-JUSTIFY and ZERO-FILL (or SPACE-FILL) are specified, the workstation will right-justify and zero-fill or space-fill the field when the field exit key is pressed. ZERO-FILL does not work with DBCS.

If only ZERO-FILL (or SPACE-FILL) is specified, the workstation does not make any conversions.

E
A binary or packed number is converted to zoned decimal before it is displayed.
F
The following conditions occur:
  • The number is padded with spaces on the left before it is displayed.
  • Initially, the decimal point is inserted for decimal digits, to divide the integer from the fractional digits.
  • One position is reserved for the decimal point if there are fractional digits.
  • If DECIMAL-POINT IS COMMA is specified in the SPECIAL-NAMES paragraph, then the meanings of comma and period are reversed. Note, there is no association with the system value QDECFMT.
  • One position is reserved for the sign, if a number is signed.
  • If the number has a negative sign, the sign is displayed. By default, the sign is leading.
F1
When ZERO-FILL is specified, leading zeros are displayed.
F2
When TRAILING-SIGN is specified, the sign occupies the rightmost position.
G
Digits, blanks, and the following symbols are accepted:
  • - (minus)
  • + (plus)
  • . (period)
  • , (comma)

The sign must be entered in the leading or trailing position. The decimal point must be entered before the fractional digits. Digits are not justified. A comma separates each group of three integer digits.

H
A number has the following characteristics:
  1. The sign symbol value is optional and if present, may precede any digit value (a leading sign) or may follow the digit value (a trailing sign). Valid signs are positive and negative. The sign symbol, if it is a leading sign, may be preceded by blank characters. If the sign symbol is a trailing sign, it must be the rightmost character in the field. Only one sign symbol is allowed.
  2. Up to 31 decimal digits may be specified. Valid decimal digits are in the range 0 through 9. The first decimal digit may be preceded by blank characters but blank characters located to the right of the leftmost decimal digit are not valid.

    The decimal digits may be divided into two parts: an integer part and a fractional part. Digits to the left of the decimal point are interpreted as integer values. Digits to the right are interpreted as fractional values. If no decimal point symbol is included, the value is interpreted as an integer value. If the decimal point symbol precedes the leftmost decimal digit, the digit value is interpreted as a fractional value, and the leftmost decimal digit must be adjacent to the decimal point symbol. If the decimal point follows the rightmost decimal digit, the digit value is interpreted as an integer value, and the rightmost decimal digit must be adjacent to the decimal point.

    Decimal digits in the integer portion may optionally have comma symbols separating groups of three digits. The leftmost group may contain one, two, or three decimal digits, and each succeeding group must be preceded by the comma symbol and contain three digits. The comma symbol must be adjacent to a decimal digit on either side.

    Decimal digits in the fractional portion may not be separated by commas and must be adjacent to one another.

I
The number is edited according to the implicit or explicit PIC symbol. ZERO-FILL, SPACE-FILL, and RIGHT-JUSTIFY do not affect an edited or floating-point field.
I1
TRAILING-SIGN does not affect an edited or floating-point field.
J
Data should be entered with edited symbols.
K
All editing symbols are removed, then the resulting number is moved back with editing into the numeric-edited field. A run-time message will be issued if nonnumeric characters are detected.
L
Data is moved back into the field and no editing is performed. It is the user's responsibility to ensure that the edited format is followed.
M
Digits, blanks, and the following symbols are accepted:
  • - (minus)
  • + (plus)
  • . (period)
  • , (comma)
N
Any character that is not a zero or a one will generate an error message.
O
The numeric field is aligned on the assumed decimal position. See Alignment Rules for the rules about positioning data.
P
An internal floating-point number is converted to external floating-point before it is displayed.
  • A COMP-1 item will display as if it had an external floating-point PICTURE clause of -.9(8)E-99
  • A COMP-2 item will display as if it had an external floating-point PICTURE clause of -.9(17)E-999
Q
Data must be entered following the rules for formation of a floating-point literal (see Floating-Point Literals). The exponent is optional.

The phrases following identifier-1 can be in any order. All phrases specified apply to the previous identifier.