TSQ Vs TDQ


Feature Temporary Storage Queue (TSQ) Transient Data Queue (TDQ)
PurposeSharing data across transactions within a CICS regionSharing data within a CICS region or from a CICS region to an external destination
Data AccessRandom and Sequential accessSequential Only (FIFO - First In, First Out)
Data PersistenceData remains until explicitly deletedData is deleted automatically after reading
RetrievabilityCan be read multiple timesCan be read only once
Storage LocationStored in CICS Temporary Storage (main storage or auxiliary storage)Defined externally in the CICS Transient Data Table (TCT)
UsageInter-transaction communicationLogging and batch job processing
Sending data to printers or external systems
Queue NamingQueue name is dynamic (created at runtime)Queue name is predefined in the DCT (Destination Control Table)
Queue TypesOnly one type (Temporary Storage)Two types:
- Intrapartition TDQ (used within CICS)
- Extrapartition TDQ (used for external systems)
SurvivabilityDoes not survive a system restart (if stored in main storage) but can persist if stored in auxiliary storageIntrapartition TDQs survive a system restart, but Extrapartition TDQs do not
Common CommandsWRITEQ TS, READQ TS, DELETEQ TSWRITEQ TD, READQ TD, DELETEQ TD
Example Use Cases- Page-up and page-down processing
- Keep temporary records for a long-running transaction
- Send data to batch processing
- Log transaction details