INQUIRE STORAGE

Retrieve information about task storage.

INQUIRE STORAGE

Read syntax diagramSkip visual syntax diagramINQUIRE STORAGEADDRESS(ptr-value)ElementFlengthnlistelistllisttask
Element
Read syntax diagramSkip visual syntax diagramELEMENT(ptr-ref )
Flength
Read syntax diagramSkip visual syntax diagramFLENGTH(data-area )
nlist
Read syntax diagramSkip visual syntax diagramNUMELEMENTS( data-area)
elist
Read syntax diagramSkip visual syntax diagramELEMENTLIST(ptr-ref)
llist
Read syntax diagramSkip visual syntax diagramLENGTHLIST(ptr-ref)
task
Read syntax diagramSkip visual syntax diagramTASK(data-value)

Conditions: INVREQ, NOTAUTH, TASKIDERR

Description

The INQUIRE STORAGE command has two functions. You can use it to get a list of the task storage areas associated with a particular task (using the NUMELEMENTS option), or you can use it to find the length and starting address of a particular area of storage (using the ADDRESS option). INQUIRE STORAGE applies only to storage allocated to user tasks, which are tasks executing user-defined transactions or the CICS-supplied transactions normally invoked by an operator.

Options

ADDRESS(ptr-value)
specifies that you are inquiring about a single area of storage and identifies the area. The address you specify can be anywhere within the area about which you are inquiring; it does not have to be the start of it. CICS returns the length of the area (in FLENGTH) and its starting address (in ELEMENT) if it is a valid element of user task storage.
DSANAME(data-value)
specifies the name of the DSA for which storage elements are to be returned.

Possible values are CDSA, UDSA, ECDSA, and EUDSA. If you omit this option, storage elements are returned for all four DSAs.

ELEMENT(ptr-ref)
returns the starting address of the storage area containing the address provided in the ADDRESS option, if the area is user task storage. This is the first byte of the area available for task data, not the preceding storage management control information, if any. If the area is not user task storage, the address returned is nulls.
ELEMENTLIST(ptr-ref)
returns the address of a list of the addresses of all areas of task storage for the task specified in the TASK option. Each address points to the first byte available for data storage, not to preceding storage management control information, if any. The number of addresses in this list is the NUMELEMENTS option value. (Addresses are 4 bytes long, and therefore the length of the list in bytes is 4 times NUMELEMENTS.)

CICS obtains the storage for this list and frees it when the inquiring task ends, or issues another INQUIRE STORAGE command with ELEMENTLIST or LENGTHLIST, or issues an INQUIRE TASK LIST; the task cannot free the storage itself.

FLENGTH(data-area)
returns a fullword binary field giving the length of the storage area containing the address provided in the ADDRESS option. This is the length of the part available for task data; it does not include storage management control information at the beginning or end of the area, if any. If the area is not user task storage, the length returned is -1.
LENGTHLIST(ptr-ref)
returns the address of a list of fullword binary lengths. Each entry in this list is the length of the storage area to which the corresponding entry in the ELEMENTLIST list points. These lengths are the amounts available for data storage and do not include storage management control information, if any.

CICS obtains the storage for this list and frees it when the inquiring task ends, or issues another INQUIRE STORAGE command with ELEMENTLIST or LENGTHLIST, or issues an INQUIRE TASK LIST; the task cannot free the storage itself.

NUMELEMENTS(data-area)
indicates that you are requesting a list of the task storage areas for the task indicated in the TASK option. CICS returns the number of areas, in fullword binary form, in the data area you provide. If you request an ELEMENTLIST or LENGTHLIST, this value is the number of entries in the list.
TASK(data-value)
specifies, as a 4-byte packed decimal value, the task number for which you are requesting a storage list. If you omit this option but include NUMELEMENTS, CICS assumes the inquiry is for the task issuing the INQUIRE STORAGE command.

Conditions

INVREQ
RESP2 values:
1
Invalid DSANAME specified.
NOTAUTH
RESP2 values:
100
The user associated with the issuing task is not authorized to use this command.
TASKIDERR
RESP2 values:
1
The task number does not exist.
2
The task number designates a system task, not a user task.