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

Module 2: CICS Architecture


CICS Transient Data

Transient Data (DFHTDP) is the general queuing facility of CICS. Programs queue records with WRITEQ TD and other programs read them back with READQ TD - inside the region or out to the world.

What is transient data

  • Transient Data is managed by the CICS component DFHTDP.
  • You can write data to a queue (WRITEQ TD), read data from a queue (READQ TD), and delete an intrapartition queue (DELETEQ TD).
  • Every queue must be defined in the DCT (Destination Control Table) before a program uses it.
  • If you leave off the TD keyword, CICS assumes temporary storage - so always code WRITEQ TD, READQ TD and DELETEQ TD for transient data.

Intrapartition queues

  • Intrapartition queues live inside the CICS region. Their records are kept in the DFHINTRA VSAM file.
  • Reading is destructive and first-in first-out: READQ TD removes the record from the queue.
  • Typical use: one program queues work (orders, messages) and another program reads and processes it.
  • Indirect queues: a queue name that points at another queue, so programs write to one name while the data lands on a different queue.

Extrapartition queues

  • Extrapartition queues send data outside CICS to sequential destinations - printers, tapes and disk files.
  • You can only write to them (WRITEQ TD). CICS cannot read them back.
  • Typical use: printing reports, writing audit trails and log records.
  • The destination dataset is described by a DD statement in the CICS startup JCL.

Automatic transaction initiation (ATI)

  • An intrapartition queue can have a trigger level - for example 10.
  • When the 10th record is written, CICS automatically starts the transaction named in the DCT entry.
  • The started transaction reads and processes the queued records.
  • ATI is how background work gets driven by online activity without any user pressing a key.

Example - WRITEQ TD to a print queue in COBOL

  • Write one print line to the extrapartition queue PRTQ01.
  • * Write a report line to the extrapartition print queue EXEC CICS WRITEQ TD QUEUE('PRTQ01') FROM(WS-PRINT-LINE) LENGTH(WS-PRINT-LEN) END-EXEC
  • PRTQ01 must be defined in the DCT as extrapartition, with a DD statement pointing at the print dataset.
  • LENGTH tells CICS how many bytes of WS-PRINT-LINE to write.





© copyright mainframebug.com
Privacy Policy
MainframeBug Assistant