in reply to EBCDIC and COBOL records

It's been a while, but in the IBM BigIron world, the x(292) is character data, and the two 9(8) COMP fields are 4 bytes of up to 8 digits zero-filled. Page 217 of the zOS COBOL Language Ref. offers the following...

Hope this helps. If you could post a sample record or two, I might be able to offer a bit more help. Good Luck.

Computational items

A computational item is a value used in arithmetic operations. It must be numeric. If the USAGE of a group item is described with any of these items, the elementary items within the group have this usage. The maximum length of a computational item is 18 decimal digits, except for a PACKED-DECIMAL item. If the ARITH(COMPAT) compiler option is in effect, then the maximum length of a PACKED-DECIMAL item is 18 decimal digits. If the ARITH(EXTEND) compiler option is in effect, then the maximum length of a PACKED-DECIMAL item is 31 decimal digits. The PICTURE of a computational item can contain only:

9 One or more numeric character positions

S One operational sign

V One implied decimal point

P One or more decimal scaling positions

COMPUTATIONAL-1 and COMPUTATIONAL-2 items (internal floating-point) cannot have PICTURE strings.

BINARY Specified for binary data items.

Such items have a decimal equivalent consisting of the decimal digits 0 through 9, plus a sign. Negative numbers are represented as the two’s complement of the positive number with the same absolute value. The amount of storage occupied by a binary item depends on the number of decimal digits defined in its PICTURE clause:

Digits in PICTURE clause = Storage occupied

1 through 4 = 2 bytes (halfword)

5 through 9 = 4 bytes (fullword)

10 through 18 = 8 bytes (doubleword)

Binary data is big-endian: the operational sign is contained in the leftmost bit.

BINARY, COMPUTATIONAL, and COMPUTATIONAL-4 data items can be affected by the BINARY and TRUNC compiler options. For information about the effect of these compiler options, see the Enterprise COBOL Programming Guide.

COMPUTATIONAL or COMP (binary) This is the equivalent of BINARY. The COMPUTATIONAL phrase is synonymous with BINARY.

Hope this helps. If you could post a sample record or two, I might be able to offer a bit more help. Good Luck.

In Section
Seekers of Perl Wisdom