Transient Data Queue (TDQ)


Transient data queues are used for sharing data within a CICS region or from a CICS region to an external destination. TDQs are often used for generating reports, transferring data between CICS and batch processing, as well as managing printer spooling.

Points to note -

  • Definition & naming - TDQs must be defined in the Destination Control Table (DCT) before they can be used.
  • Storage - Transient data queues are always written to a data set.
  • Read - TDQs can read sequentially. TDQs are read-destructive. When an item is read from a TDQ, it is deleted and cannot be accessed in the future.
  • Update - Items in a TDQ can't be updated.
  • Delete - We are unable to delete individual items from the TDQ; we must delete the entire queue. Deleting (DELETEQ) the queue removes all its records.
  • Automatic Task Initiation: TDQ can trigger a transaction when the number of records in the queue exceeds the TRIGLEV defined in the DCT entry. The transaction coded in the TRANSID of DCT is automatically triggered.

Types -

There are two types of TDQ’s based on its usage -

  • Intra-partition TDQ
  • Extra-partiition TDQ

Intra-partition TDQ -


TDQs are intrapartition if they are associated with the CICS region locally. Intrapartition TDQs can be used by other programs running as separate tasks within the same CICS region.

Points to note -

  • Intrapartition TDQ must consist of variable-length records.
  • Intrapartition queues can be associated with a terminal or an output data set.
  • There are three types of Intra partition TDQs based on its nature -
    • Non-recoverable
    • Physically recoverable
    • Logically recoverable

Extra-partition TDQ -


Transient data queues are extra partitions when data is transferred to an external destination from the CICS region. The external destination could be another CICS region, a batch system, a printer, or other options.

Points to note -

  • Extrapartition queues exist on any sequential device (DASD, tape, printer, etc.) that can be accessed by programs outside of the CICS region.
  • Extra partition TDQ is not read destructive.
  • Extra partition data consists of fixed-length or variable-length records, blocked or unblocked.
  • The queue definition provides the logical organization of records that are in the queue.

TDQ Commands -

Below operations can be performed on TDQs –

Command Description
WRITEQ TD Write data into TDQ
READQ TD Read data from the TDQ
DELETEQ TD Deletes the entire TDQ