It's time to mind your TSQ's and TDQ's
bobby_g 060000DF9B Comment (1) Visits (3682)
Over the years there have been some inquisitive CICS customers that have wanted to know more about Temporary Storage Queues (TSQ) and Transient Data Queues (TDQ) data in the world of CICS. After doing some research and chatting with a CICS developer here are some differences between TSQ's and TDQ's.
In TSQ, data can be written and read either sequentially or randomly, while in TDQ, the data is written or read only sequentially. TSQ's can be both input and output, while TDQ's are either input or output.
In TSQ, the data can be read any number of times because it remains in the queue until the entire queue is deleted. In a TDQ data item, it is read only once. To reuse the TDQ data, it must be closed and then reopened, assuming it is in an input queue.
Data can be updated in place for TSQ, but not in TDQ.
TSQ can be written to auxiliary or main storage, while TDQ is written to disk. Temporary storage is a holding place, while Transient data is always associated with a distinct destination. TSQ data can also go to a coupling facility where it can be shared by other CICS regions. TDQ output typically goes to disk but could also go to sysout (print).
The TSQ name is defined dynamically, while a TDQ name is defined in the DCT.
Note: The COMMAREA is used to pass data in TSQ 's from task to task, while a TDQ is used to accumulate records before processing or send data for external use, for example, a print operation. TSQ's might be used to "stage" data during a repetitive input cycle prior to processing, but they can also be used by CICS itself for a number of reasons. TDQ's can be used to input "one time" parameters or data from a file into CICS or to output log records, print data etc.
TSQ does not use a trigger level while TDQ data has a trigger level (automatic task initiation).