Syntax rules
These phrases specify binary data items.
The PICTURE clause of a binary data item must contain no other characters but 9s, the operational sign S, the assumed decimal point V, and one or more Ps (see section "PICTURE clause").
The data items are stored in a halfword, fullword, or doubleword, and are aligned only if the SYNCHRONIZED clause was specified.
General rules
If a data item described with USAGE IS BINARY is used as a receiving data item, a check is made to determine whether the value to be transferred to this data item exceeds the maximum possible value indicated by the PICTURE character-string in the PICTURE clause. If this is the case, the value is made to conform by truncation.If a receiving data item is described with USAGE IS COMPUTATIONAL or COMPUTATIONAL-5, this check and any subsequent truncation which may be required are not performed.
The PICTURE string specified in the PICTURE clause is also evaluated if USAGE IS COMPUTATIONAL or COMPUTATIONAL-5 is specified in a DISPLAY statement. This evaluation serves to check the overflow condition.
The storage requirements for binary items vary depending on the number of decimal digits specified in the PICTURE clause, as follows:
Decimal digits in
the PICTURE clauseBytes required in
computer storageAlignment 1-4 2 Halfword 5-9 4 Word 10-18 8 Word 19-31 16 Word The leftmost bit of a binary data item is the operational sign. The remaining bits represent the value.
For examples of the BINARY, COMPUTATIONAL or COMPUTATIONAL-5 phrases see table 17, "Internal representation of internal data items" in section "COMPUTATIONAL-3 phrase or PACKED-DECIMAL phrase".