CICS TSQ Vs TDQ
| Feature | Temporary Storage Queue (TSQ) | Transient Data Queue (TDQ) | 
|---|---|---|
| Purpose | Sharing data across transactions within a CICS region | Sharing data within a CICS region or from a CICS region to an external destination | 
| Data Access | Random and Sequential access | Sequential Only (FIFO - First In, First Out) | 
| Data Persistence | Data remains until explicitly deleted | Data is deleted automatically after reading | 
| Retrievability | Can be read multiple times | Can be read only once | 
| Storage Location | Stored in CICS Temporary Storage (main storage or auxiliary storage) | Defined externally in the CICS Transient Data Table (TCT) | 
| Usage | Inter-transaction communication | Logging and batch job processing Sending data to printers or external systems | 
| Queue Naming | Queue name is dynamic (created at runtime) | Queue name is predefined in the DCT (Destination Control Table) | 
| Queue Types | Only one type (Temporary Storage) | Two types: - Intrapartition TDQ (used within CICS) - Extrapartition TDQ (used for external systems) | 
| Survivability | Does not survive a system restart (if stored in main storage) but can persist if stored in auxiliary storage | Intrapartition TDQs survive a system restart, but Extrapartition TDQs do not | 
| Common Commands | WRITEQ TS, READQ TS, DELETEQ TS | WRITEQ 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 | 
