In this topic, we described about the Temporary Storage Queue (TSQ) with detailed example.
Temporary Storage is the CICS facility that makes the storing data available to multiple transactions. Temporary Storage Queues are used to keep the data items of temporary storage.
The data items can be retrieved by using the symbolic name assigned to the temporary storage queue. A TSQ containing multiple items and specific items (logical records) in a queue are referred to by relative position numbers.
The items can be addressed either sequentially or directly by item number. TSQ names can be 16 char which is a combination of alphanumeric characters.TSQ generally creates with dynamic names to avoid duplicate queues creation.
The name of the Temporary Storage Queue can be created by using the symbolic name provided in application program and the second half would be timestamp of the execution time. TSQ name would be a combination of symbolic name (Program name most of the cases) and the timestamp (current time portion).
Ex - CICSPROG11060309
Items that are in a temporary storage queue can be changed. TSQ needs more CPU percentage when compared to other data passing methods between the programs.
TSQ doesn't need to create it until it is required and can delete it whenever it is not required. TSQs are a good choice for relatively high-volume data and data that varies in length or duration.
TSQs remain in storage until they are deleted by the creating task or by any other task or on an initial or cold start. Application programs first WRITE TS QNAME command creates the TSQ.
Temporary Storage Queues in main memory can’t be defined as recoverable. Temporary Storage Queues in auxiliary memory can be defined as recoverable.
CICS recovery is not available for temporary storage queues in shared temporary storage pools. Main memory is better than auxiliary memory for short term TSQs and auxiliary memory is better than main memory for long term or recoverable TSQs.
Temporary Storage Queues can be deleted automatically when no more utilization is required by setting expiring interval. If the Temporary Storage Queue is recoverable, then it should be declared as recoverable TSQ in Temporary Storage Tables (TST).
If the Temporary Storage Queue is not recoverable, then no need to define TSQ in TST. Below operations can be performed on TSQs –
|WRITEQ TS||Write data to a temporary storage queue|
|READQ TS||Read data from a temporary storage queue|
|DELETEQ TS||Deletes a temporary storage queue|