Let's understand Mainframe
Home Tutorials Interview Q&A Quiz Mainframe Memes Contact us About us

Module 7: CICS Temporary Storage and Transient Data


Extra-Partition TS

An extra-partition TS queue lives outside main memory, on disk in the temporary storage file DFHTEMP. It is the durable kind of temporary storage: bigger, slower than memory, but it survives while CICS is up and can be recovered.

What extra-partition means for TS

  • "Extra-partition" here means outside the region's main storage. For TS, you get this with the AUXILIARY option on WRITEQ TS.
  • The data is kept in DFHTEMP, a VSAM file managed by CICS, so it does not use region memory.
  • Auxiliary queues can be much larger than main storage queues, limited by the DFHTEMP file size.
  • Like all TS queues, they are still CICS-internal: only programs in the region can read them.

When to use it

  • Large scratch data that would waste region memory, such as many formatted screen pages.
  • A suspend data set: a task interrupted mid-work writes its incomplete data to an AUXILIARY queue, ends, and later resumes by reading it back.
  • Data that must survive a task abend and be picked up again, within the life of the CICS region.
  • Queues shared by many tasks where memory pressure is a concern.

How to code it

  • Code WRITEQ TS ... AUXILIARY. READQ TS and DELETEQ TS are unchanged.
  • The first WRITEQ creates the queue in DFHTEMP; later writes append items with the next item numbers.
  • Delete the queue with DELETEQ TS when done, or it stays in DFHTEMP indefinitely.

Example:-

*--- Suspend the data collection task to disk ---* EXEC CICS WRITEQ TS QUEUE(TS-QUEUE-NAME) FROM(TS-SUSPEND-AREA) AUXILIARY RESP(RESPONSE-CODE) END-EXEC. *--- Resume later: read the suspended data back ---* EXEC CICS READQ TS QUEUE(TS-QUEUE-NAME) INTO(TS-SUSPEND-AREA) ITEM(1) RESP(RESPONSE-CODE) END-EXEC. EXEC CICS DELETEQ TS QUEUE(TS-QUEUE-NAME) END-EXEC.






© copyright mainframebug.com
Privacy Policy
MainframeBug Assistant