Question: What is the practical application of TSQs? What is the difference between a TSQ and an ESDS or other VSAM file?

Answer: A TSQ is a TEMPORARY storage queue. It is used to hold information being passed from one page to the next (either the next execution of the same program or a different program). It can either be set to store the information in main storage or aux storage. In the latter case it actually writes the records temporarily to a KSDS VSAM file. Without using TSQs or TDQs a pseudo conversational CICS program would have no way of passing more than a few hundred bytes of data to itself (or another program) to display the next screen.

Reading and writing to VSAM files using regular read and write statements from within the program are simply accessing the file the same way that any program accesses files and the files can be used the same way. The type of file ESDS, KSDS etc simply determines how the data is stored and whether the file needs to be processed sequentially or can be processed in random order.

A TSQ either holds the data written to the queue in memory or writes it to a temporary file and either the same program or a different CICS program run straight afterwards can then read the queue of data back in so as to process it. A TDQ differs from a TSQ in that it does a destructive read. It deletes the records from the queue as it reads them so as to only allow each record to be read once.


This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow