GETSTOR Function

The GETSTOR function is used to acquire storage from the thread used by the application. In contrast to the GETMAIN function, GETSTOR can be used to allow storage to be obtained from above the 16 MB line, if available.

The length requested must be a multiple of eight, otherwise Com-plete will round it up.

Storage acquired using the GETSTOR function can be released using the FREEMAIN function.

Format

The format for using the GETSTOR function is:

retcode Required.
A fullword where Com-plete places the return code upon completion of the operation.
length Required.
A fullword containing the length of the storage area to be acquired.
address Required.
A fullword where Com-plete places the address of the acquired storage.
location Optional.
Default: If no location is specified, storage is acquired from below the 16 MB line.A three-byte character field indicating where to acquire storage from: BEL indicates storage to be acquired from below the 16 MB line, ANY indicates storage to be acquired from any location above or below the 16 MB line.
Return codes
0 Successful completion.
4 The amount of space requested was not available.
12 An invalid request or an invalid FQE was found.