FALSE

Page Nav

HIDE

Grid

GRID_STYLE

ReadQ TS Command (TSQ)

The READQ TS command             EXEC CICS                         READQ TS QUEUE(name)                          { INTO(data-area) | SET...

The READQ TS command
            EXEC CICS
                        READQ TS QUEUE(name)
                         { INTO(data-area) | SET(pointer-ref) }
                         [ LENGTH(data-value) ]
                         [ NUMITEMS(data-value) ]
                         [ ITEM(data-area) | NEXT ]
                         [ SYSID(name) ]
           END-EXEC

options
QUEUE One to eight character queue name.

INTO The data area into where the data from the queue is to be written.

SET Specifies the data area that will contain the address of the retrieved record.

LENGTH A binary half word PIC S9(4) COMP field that on input specifies the length of the data area and on return from the call has the length of the record that has been read.

ITEM A half word PIC S9(4) COMP field which specifies the item to be read from the queue.

NUMITEMS A binary half word field that CICS sets with the number of items in the queue.

SYSID Connection name of the remote system where this queue is defined.

Exceptions
INVREQ The queue was created for CICS internal use and cannot be written into by a user program.

IOERR An IOERR occurred.

ISCINVREQ An undeterminable error occurred on the remote system that has the queue.

ITEMERR No record exists for the item number specified.

LENGERR The length of the record exceeds the length of the buffer specified.

QIDERR The specified queue does not exist.

SYSIDERR The system defined by SYSID could not be located or accessed.

Notes
The access to TS queues can be sequential or direct. For direct access specify the item number. Note however that CICS maintains one and only one position in the queue for all tasks that access the queue. If multiple tasks access the queue sequentially, tasks may not get the next record due to intervening access by another task. If tasks want to reserve the queue for exclusive use they must use CICS ENQ and DEQ specifying the same resource name.

Since temporary storage queues are created and deleted dynamically, always check for the QIDERR. If you specify ITEM check for the ITEMERR condition.

No comments