Transient Data Queue (TDQ)


The CICS transient data control facility provides a generalized queuing ability. Transient data queues are used to store the data for subsequent internal or external processing.

Data specified in the application program can be routed to or from predefined symbolic intrapartition or extra partition transient data queues.

Transient data queues are intrapartition if they are associated to the CICS region locally. Transient data queues are extra partition if the data is directed to a external destination to the CICS region.

Transient data queues must be defined and installed before referring them by an application program. If the TD keyword is omitted, the command is assumed to be for temporary storage.

Transient Data Queues can only read once and sequentially. TDQ is read destructive and data will be erased from the queue once the record read in the application program.

Record in a TDQ can't be updated. TDQs name must be defined in the DCT (Destination Control Table) first. TDQ may be used by batch or online applications.

TDQ can automatically trigger a CICS transaction which is called as ATI (Automatic Task Initialization). If trigger level defined as n, it triggers the transaction associated with it after nth record is written to TDQ.

Transient data queues are always written to a file. There are two types of TDQ’s based on its usage -

  • Intrapartition transient data queue
  • Extra partition transient data queue

Intrapartition transient data queue -


Transient data queues are intrapartition if they are associated to the CICS region locally. Intrapartition TDQ can be processed by other programs that are running as separate tasks within the same CICS region.

Data that is directed to or from these internal queues is called intrapartition data. Intrapartition TDQ must consist of variable-length records.

Intrapartition queues can be associated with either a terminal or an output data set. Application program sequentially access the intrapartition TDQ records and the records deleted logically from the queue after the successful read.

Once a record has been read, it cannot be read subsequently by another task. Intrapartition data may be transmitted upon request to the terminal or retrieved sequentially from the output data set.

Intrapartition destinations uses are including message switching, broadcasting, database access, data collection, distribution of output to several terminals and queuing of data. There are three types of intrapartition transient data queue -

  • Non-recoverable
  • Physically recoverable
  • Logically recoverable

Extra partition transient data queue -


Transient data queues are extra partition if the data is directed to a external destination to the CICS region. Extra partition destinations are queues that are residing on any file system. Extra partition TDQ is not read destructive.

Data accessible to application programs on any CICS region. Data can also be routed to output devices such as printers.In general, extra partition destinations are used for storing and retrieving data outside the CICS region or non-CICS programs.

Extra partition data consists of sequential records that are fixed length or variable length as predefined for the destination. The queue definition provides the logical organization of records that are in the queue. Each extra portion TDQ record is stored in separate physical file.

Operations on TDQ


The below operations can be performed on TDQ –

Operation Description
WRITEQ TD Write data to a transient data queue
READQ TD Read data from a transient data queue
DELETEQ TD Delete the contents of an intrapartition transient data queue