CICS READ TDQ

CICS WRITE TDQ CICS DELETE TDQ

Advertisements


Used to read data from the transient data queue.

Delete TD Queue command would be safe if the connection is IPIC.

Delete TD Queue command if the connection is other than IPIC.

For the above two cases, the command can be executed in local region or remote region.


Syntax:

EXEC CICS 

     READQ TD QUEUE(name)/ SET(ptr-ref)
           INTO(data-area)
           LENGTH(data-area)
           SYSID(system-name)
           NOSUSPEND

END-EXEC. 
 

READQ TD reads transient data from a queue.

The record is no longer available after the READ.

If automatic transaction initiation (ATI) used, application program needs to handle QZERO condition to ensure that termination of an automatically initiated task occurs when the queue is empty.

If the READQ TD command attempts to access a record in a logically recoverable intra-partition queue, and there are no more committed records, the command will wait until the queue is no longer being used for output.


INTO(data-area):

Specifies the data area into which the data read from the transient data queue is to be placed.


LENGTH(data-area):

Specifies the length of the record that needs to be read.

Half word binary value.

If INTO option specified, LENGTH specifies the maximum length of data that the application program can accept.

If the value specified is less than zero, zero is assumed.

If the data retrieved length exceeds the length value specified, the data is truncated to that value.

The LENGERR condition occurs for the above case.


NOSUSPEND

Used to not suspend the application program attempt to read from queue that is already being used for output.

This option applies to intra-partition queues only.


QUEUE(name)

Specifies the symbolic name of the queue from where the data read from.

Name must be of length 1 - 4 alphanumeric characters.

The queue name must have been defined to CICS in DCT.

If SYSID is provided during the definition, the queue is assumed to be on a remote system irrespective of how it is defined.


SET(ptr-ref)

Specifies a pointer reference that is used to be set to the address of the data read from the queue.

The area is retained until another transient data command is executed.

The pointer reference can’t change by other commands or statements and is valid until the next READQ TD command or the end of task.

If DATALOCATION (ANY) is associated with the application program, the address of the data can be above or below the 16 MB line.

If DATALOCATION (BELOW) is associated with the application program, and the data resides above the 16 MB line.


SYSID(system-name)

Used for remote systems only

Specifies the name of the remote system.

Name is of length 1 - 4 characters.


Error Conditions:


16 INVREQ

Occurs if READQ triggered on an extra-partition queue that has been opened for output.

The condition can’t occur for intra-partition queues.

Task will terminate abnormally.


17 IOERR

Occurs when an input/output error occurs.

Task will terminate abnormally.


19 NOTOPEN

Occurs if the destination connection is closed.

This condition applies to extra-partition queues only.

Task will terminate abnormally.


22 LENGERR

Occurs if READQ INTO area length is lesser than the record length that is read from queue.

Task will terminate abnormally.


23 QZERO

Occurs when the destination queue is empty.

And also the end of the queue has been reached.

Task will terminate abnormally.


44 QIDERR

Occurs if the symbolic destination queue name used READQ TD cannot be found.

Task will terminate abnormally.


53 SYSIDERR

Occurs when the SYSID name specified that is neither the local system nor a remote system.

SYSIDERR also occurs when the connection closed with the remote system.

Task will terminate abnormally.


70 NOTAUTH

Occurs if a resource security check has failed on QUEUE (name).

Task will terminate abnormally.


84 DISABLED

Occurs if the queue has been disabled.

Task will terminate abnormally.


CICS WRITE TDQ CICS DELETE TDQ

Advertisements