READQ TD - IBM Mainframe

The READQ TD command is to read data from a transient data queue (after which the record is no longer available). The handle condition QZERO should be included in your application program when using automatic transaction initiation (ATI) to ensure that termination of an automatically initiated task occurs only when the queue is empty. The syntax of the command is given below:

READQ TD

The different available options of the command are:

  • INTO (dataarea) - Identifies the data area where the transient data queue will be written.
  • LENGTH (dataarea) - When using the INTO option, the LENGTH option must be a data area that specifies the largest record the program accepts. When the retrieved record exceeds the LENGTH option value specified, the record is truncated to the1 specified LENGTH option value, the LENGERR condition occurs, and the LENGTH data area is set to the length of the record prior to truncation. When using the SET option, the LENGTH option is not required, but if it is used, then the argument must be a data area.
  • NOSUSPEND - Notifies CICS to NOT "suspend the application program when the QBUSY condition occurs. This option is only valid with intrapartition queues.
  • QUEUE (name) - Character field (1-4 bytes) containing the symbolic name of the queue to be read from which also should have been defined in the CICS DCT (Destination Control Table). Unpredictable results can occur if the name is the same as that of the system spool file. When the SYSID option is used, the data set is assumed to be on the remote system regardless of the definition in the local CICS DCT.
  • SET (ptr_ref) - This option when used indicates that CICS will set the pointer reference to the address that is to contain the data read from the queue. (CICS acquires the storage large enough to hold the record) The data area acquired is retained until another transient data command is executed. The pointer reference once set is valid until the next READ TD command is issued unless changed by other commands or statements, or the end of the task occurs. The pointer reference address can be above or below the 16MB line when DATALOCATION (ANY) is associated in RDO with the application program. When the pointer reference address resides above the 16MB line, and the DATALOCATION (BELOW) is associated in RDO with the application program, then the data is copied below the 16MB line, and the address of this copy's new location is returned. When storage protection is active, and TASKDATAKEY(USER) is specified, the returned data" is in user-key DSA, else if TASKDATAKEY(CICS) is specified the data returned is in a CICS-key DSA.
  • SYSID (system name) remote systems only - Character field (4 bytes) specifying the name for the APPC connection where the request will be directed to. If the INTO option is used, the LENGTH option must be a data area that specifies the largest record the program accepts. When the retrieved record exceeds the LENGTH option value specified, the record is truncated to the specified LENGTH option value, the LENGERR condition occurs, and the LENGTH data area is set to the length of the record prior to truncation. When using the SET option, the LENGTH option is not required, but if it is used, then the argument must be a data area.
  • Handle Conditions:

  • DISABLED - Condition is set when the queue has been disabled. The default action is the abnormal termination of the task.
  • INVREQ - Condition is set when READQ names an extrapartition queue that has been opened for output. This condition cannot occur for intrapartition queues The default action is the abnormal termination of the task.
  • IOERR - Condition is set when an input/output error occurs and the data record in error is skipped. This condition is valid as long as the queue can be read. (QZERO is set when the queue can no longer be read). The default action is the abnormal termination of the task.
  • ISCINVREQ - Condition is set when the remote system indicates a failure that does not correspond to any known condition. The default action is the abnormal termination of the task.
  • LENGERR - Condition is set when READQ names an INTO area that is not large enough to hold all the data to be returned to the application program. The length check is made after the XTDIN exit has been invoked. The default action is the abnormal termination of the task.
  • NOTAUTH - Resource security check failure has occurred on QUEUE (name). The default action is the abnormal termination of the task.
  • NOTOPEN - Condition is set when the destination is closed. This condition applies to extrapartition queues only. The default action is the abnormal termination of the task.
  • QBUSY - Condition is set when READQ TD command attempts to access a record in a logically recoverable intrapartition queue that is being written to or is being deleted by another task, and there are no more committed records. This condition is only valid for intrapartition queues. By default the task issuing the READQ TD command waits until the queue is no longer being used for output. The NOSUSPEND option overrides this default action.
  • QIDERR - Condition is set when the symbolic destination specified in the READQ TD command cannot be found. The default action is the abnormal termination of the task.
  • QZERO - Condition is set when the destination (queue) is empty or the end of the queue has been reached. The default action is the abnormal termination of the task.
  • SYSIDERR - The SYSID specified cannot be found in the intersystem table, (defined in CICS by defining a CONNECTION), or if the link to the remote system is unavailable or closed. The default action is the abnormal termination of the task.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics