Skip to content

Data Memory Allocation

Find Here after the memory allocation for every USAGE clause

"Format Native" means that the data may be stored in either little or big-endian representation, depending on the platform on which the program is running.

BINARY / COMPUTATIONAL

Attribute Description
Size Depends on number of “9”s in PICTURE and the ”binary- size” setting of the configuration file used to compile the program. See binary-size description. The default value of bin-opt:[yes/no]is bin-opt:no

When set to yes: Enables binary operation optimization. The –bin-opt optimizations are enabled by use of the –O compiler flag.
Format bin-opt-strict:[yes/no]

When set to yes:
Causes -fbin-opt binary operation optimization to be strictly respected. The binary-byteorder setting of the configuration file is used to compile the program.
Negative value allowed If PICTURE contains “S”
PICTURE allowed Yes

BINARY-CHAR / BINARY-CHAR SIGNED

Attribute Description
Size 1 byte
Format Native
Negative value allowed Yes
PICTURE allowed No

BINARY-CHAR UNSIGNED

Attribute Description
Size 1 Byte
Format Native
Negative value allowed No
PICTURE allowed No

BINARY-C-LONG / BINARY-C-LONG SIGNED

Attribute Description
Size Allocates the same amount of storage as does the C language “long” data type on that computer; typically this is 32 bits, however it can be 64 bits.
Format Native
Negative value allowed Yes
PICTURE allowed No

BINARY-C-LONG UNSIGNED

Attribute Description
Size Allocates the same amount of storage as does the C language “long” data type on that computer; typically this is 32 bits, however it can be 64 bits.
Format Native
Negative value allowed No
PICTURE allowed No

BINARY-DOUBLE / BINARY-DOUBLE SIGNED

Attribute Description
Size Allocates a traditional double-word of storage (64 bits)
Format Native
Negative value allowed Yes
PICTURE allowed No

BINARY-DOUBLE UNSIGNED

Attribute Description
Size Allocates a traditional double-word of storage (64 bits)
Format Native
Negative value allowed No
PICTURE allowed No

BINARY-LONG / BINARY-LONG SIGNED / SIGNED-LONG / SIGNED-INT

Attribute Description
Size 32 Bits
Format Native
Negative value allowed Yes
PICTURE allowed No

BINARY-SHORT / BINARY-SHORT SIGNED / SIGNED-SHORT

Attribute Description
Size 16 Bits
Format Native
Negative value allowed Yes
PICTURE allowed No

BINARY-SHORT UNSIGNED / UNSIGNED-SHORT

Attribute Description
Size 16 Bits
Format Native
Negative value allowed No
PICTURE allowed No

COMPUTATIONAL-1

Attribute Description
Size Allocates a word of storage (32 bits)
Format Single-precision floating-point
Negative value allowed Yes
PICTURE allowed No

COMPUTATIONAL-2

Attribute Description
Size Allocates a double-word of storage (64 bits)
Format Double-precision floating-point
Negative value allowed Yes
PICTURE allowed No

COMPUTATIONAL-3 / PACKED-DECIMAL

Attribute Description
Size Allocates 4 bits per “9” in the PICTURE plus a (trailing) 4-bits field for the sign, rounded up to the nearest byte.
Format Packed decimal
Negative value allowed If PICTURE contains “S”
PICTURE allowed Yes

COMPUTATIONAL-4

Attribute Description
Size If the pack-comp-4 setting of the configuration is set to yes, the size is computed like a COMPUTATIONAL as if the binary-size setting of the configuration is set to “1— 8”. If the pack-comp-4 setting of the configuration is set to No, the size is identical to COMPUTATIONAL. See binary-size description.
Depends on setting of bin-opt:[yes/no]

Default is: bin-opt:no

When set to yes:
Enables binary operation optimization. The –bin-opt optimizations are enabled by use of the –O compiler flag.
Format bin-opt-strict:[yes/no]

When set to yes:
Causes -fbin-opt binary operation optimization to be strictly respected. Thebinary-byteorder setting of the configuration file is used to compile the program.
Negative value allowed If PICTURE contains “S”
PICTURE allowed Yes

COMPUTATIONAL-5

Attribute Description
Size Depends on number of “9”s in PICTURE and the ”binary-size” setting of the configuration file is used to compile the program. See binary-size description.
Format Native
Negative value allowed If PICTURE contains “S”
PICTURE allowed Yes

COMPUTATIONAL-6

Attribute Description
Size Allocates 4 bits per “9” in the PICTURE, as is done with COMPUTATIONAL-3 data items. However, the data may not be SIGN'ed, so there is no trailing 4-bit field for the sign. When the number of digits is odd, the high-order 4-bits contains a 0. To calculate the size of a comp-6 data item, divide the PICTURE size by 2 and round up.
Format Packed Decimal
Negative value allowed No
PICTURE allowed Yes

COMPUTATIONAL-X

Attribute Description
Size The size is computed like Signed COMPUTATIONAL as if the ”binary-size” setting of the configuration is set to “1— 8” and SIGN'ed rules are used event if the Picture does not include “S”. Value of bin-opt:[yes/no] - default is No. bin-opt:no

When set to yes:
Enables binary operation optimization. The –bin-opt optimizations are enabled by use of the –O compiler flag.
Format bin-opt-strict:[yes/no]

When set to yes:
Causes -fbin-opt binary operation optimization to be strictly respected. The binary-byteorder setting of the configuration file is used to compile the program.
Negative value allowed If PICTURE contains “S”
PICTURE allowed Yes

DISPLAY

Attribute Description
Size Depends on PICTURE
One character per X, A, 9, period, $, Z, 0, *, S
(if SEPARATE CHARACTER specified), +, - or B symbol in PICTURE; Add 2 more bytes if DB or CR symbol used.
Format Byte
Negative value allowed If PICTURE contains “S”
PICTURE allowed Yes

INDEX

Attribute Description
Size 32 Bits
Format Native
Negative value allowed No
PICTURE allowed No

POINTER / PROGRAM-POINTER

Attribute Description
Size 32 Bits or 64 Bits depending memory model used
Format Native
Negative value allowed No
PICTURE allowed No
Back to top