GETMAIN

Top  Previous  Next

This command is used to obtain a specified amount of main storage and, optionally, to initialize that storage to a specified bit configuration.

The pointer reference specified in the SET option is set to the address of the acquired storage.

GETMAIN SET(ptr)
LENGTH(len) | FLENGTH(len)
[ SHARED ]
[ INITMIG(area) ]
[ USERDATAKEY ]
[ CICSDATAKEY ]

Options

FLENGTH(len)

specifies the number of bytes of storage required, in fullword binary format.

INITMIG(area)

specifies an optional 1-byte initialization value. If you specify INITIMG, CICS sets every byte of the acquired storage to the bit string you provide.

LENGTH(len)

specifies the number of bytes (unsigned halfword binary value) of storage required. LENGTH implies storage from below the 16MB line and has an upper limit of 65 520 bytes. If you want storage above the 16MB line or a larger area, use FLENGTH.

SET(ptr)

sets the pointer reference to the address of the acquired main storage. The pointer is set to the first byte of the storage area.

SHARED

prevents the automatic release of storage obtained by a GETMAIN command at the end of the task that requested it.

USERDATAKEY

Only for mainframe compatibility reasons: produces no effect.

CICSDATAKEY

Only for mainframe compatibility reasons: produces no effect.