SMGF gate, GETMAIN function

The GETMAIN function of the SMGF gate is used to allocate an element of storage from a subpool.

Input Parameters

STORAGE_CLASS
Optional Parameter
Identifies the class of storage to be allocated.
The parameter can take the following values:
  • CICS
  • CICS24
  • TASK
  • TASK24
  • TASK31
  • USER
  • USER24
SUBPOOL_TOKEN
Optional Parameter
A token that identifies the subpool within which the element is to be allocated.
SUSPEND
If there is insufficient storage to satisfy the request, SUSPEND(YES) suspends the caller until the request can be satisfied, and SUSPEND(NO) sets REASON to INSUFFICIENT_STORAGE.
The parameter can take the following values:
  • NO
  • YES
GET_LENGTH
Optional Parameter
The length of the storage requested.
INITIAL_IMAGE
Optional Parameter
An optional byte value to which every byte in the new element is set.
LOCK_POOL
Optional Parameter
Indicates whether access to the subpool is to be controlled by a lock.
The parameter can take the following values:
  • NO
  • YES
REMARK
Optional Parameter
An optional 8-character field that identifies the GETMAIN operation for problem determination. This field is highlighted when the GETMAIN trace is interpreted. Typically, it is the name of the control block whose storage is being obtained.

Output Parameters

REASON
The following values are returned when RESPONSE is DISASTER:
  • ABEND
  • ACTIVATE_FAILURE
  • LOCK_ERROR
  • LOOP
  • UNLOCK_ERROR
The following values are returned when RESPONSE is EXCEPTION:
  • INSUFFICIENT_STORAGE
The following values are returned when RESPONSE is INVALID:
  • INVALID_GET_LENGTH
  • INVALID_INITIAL_IMAGE
  • INVALID_STORAGE_CLASS
  • INVALID_SUBPOOL_TOKEN
  • NO_GET_LENGTH
  • NOT_SUBPOOL_OWNER
  • SUBPOOL_LOCK_FAILED
  • SUBPOOL_UNLOCK_FAILED
ADDRESS | ADDRESS_64
ADDRESS
The 31-bit address of the new element.
ADDRESS_64
The 64-bit address of the new element.
RESPONSE
Indicates whether the domain call was successful. For more information, see RESPONSE parameter on domain interfaces.
ELEMENT_LENGTH
Optional Parameter
The actual length of the new element (after it is rounded up to a multiple of the boundary for the subpool).


dfhs3_SMGFgetmain.html | Timestamp icon Last updated: Monday, 5 June 2017