INQUIRE TASK LIST

Retrieve a list of user tasks.

Read syntax diagramSkip visual syntax diagram
INQUIRE TASK LIST

>>-INQUIRE TASK LIST--LISTSIZE--(--data-area--)----------------->

>--+--------------+--+---------+--+-----------+----------------->
   '-DISPATCHABLE-'  '-RUNNING-'  '-SUSPENDED-'   

>--+---------------------------------------------------+-------><
   '-SET--(--ptr-ref--)--+---------------------------+-'   
                         '-SETTRANSID--(--ptr-ref--)-'     

Condition: NOTAUTH

Description

The INQUIRE TASK LIST command returns a list of user tasks. User tasks are tasks associated with user-defined transactions or with CICS®-supplied transactions that are normally invoked by an operator. You can restrict the list to tasks that are DISPATCHABLE (ready to run), RUNNING, or SUSPENDED at the time of the inquiry, or any combination of these.

Options

DISPATCHABLE
specifies that tasks ready to run (dispatchable) should be included in the task list. These tasks are also included if you specify none of the category options (DISPATCHABLE, RUNNING, and SUSPENDED).
LISTSIZE(data-area)
returns a fullword binary field giving the number of tasks in the categories you included in your inquiry. This is the number of entries in the lists that the SET and SETTRANSID options produce. If there are no tasks in the categories requested, LISTSIZE contains zero.
RUNNING
specifies that the tasks executing (including the one issuing the command) should be included in the task list. The tasks are also included if you specify none of the category options (DISPATCHABLE, RUNNING, and SUSPENDED).
SET(ptr-ref)
returns the address of a list of 4-byte packed-decimal task numbers. Each entry in the list identifies a task in one of the categories requested (see the DISPATCHABLE, RUNNING, and REQUESTED options). If there are no tasks in the categories requested, the SET pointer contains a null value.

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

SETTRANSID(ptr-ref)
returns the address of a list of 4-byte transaction identifiers. Each entry in the list is the name of the transaction that the task in the corresponding entry in the SET list is executing. If there are no tasks in the categories that you have specified, the SETTRANSID pointer contains a null value.

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

SUSPENDED
specifies that suspended tasks (tasks waiting for some event or condition) should be included in the task list. For this purpose, tasks which have not reached the point of initial dispatch, either because the task class to which they belong is at its maximum or because the maximum for the system has been reached, are considered suspended. Suspended tasks are also included if you specify none of the category options (DISPATCHABLE, RUNNING, and SUSPENDED).

Conditions

NOTAUTH
RESP2 values:
100
The user associated with the issuing task is not authorized to use this command.


dfha8_inquiretasklist.html | Timestamp icon Last updated: Thursday, 27 June 2019