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

Module 12: CICS Resource Definitions and Administration


TD Queue Definitions

TD queue definitions describe transient data queues - CICS-managed sequential queues used for passing data between tasks, feeding printers, and triggering work automatically.

The three types of TD queue

  • EXTRA - the queue lives outside CICS, usually a sequential data set or a printer. CICS reads from or writes to it like a file.
  • INTRA - the queue lives inside CICS. Tasks write records with EXEC CICS WRITEQ TD and other tasks read them back.
  • INDIRECT - an alias name that points at another EXTRA or INTRA queue, so programs can use a stable name while the real queue moves.
  • Intrapartition queues can trigger ATI - automatic transaction initiation - when the queue depth hits a trigger level.

Key attributes of a TDQUEUE definition

  • QUEUE - the 1 to 4 character queue name used in EXEC CICS WRITEQ TD / READQ TD.
  • TYPE - EXTRA, INTRA or INDIRECT.
  • DDNAME - for EXTRA queues, the DD name of the data set in the CICS JCL.
  • TRIGLEVEL - for INTRA queues, the number of records that starts ATI.
  • ATITRANID - the transaction started automatically when TRIGLEVEL is reached.
  • ATITERMID / ATIFACILITY - where the triggered transaction runs.
  • ATITIME and ATIUSERID - when it may run and under which user id.
  • RECOVSTATUS - PHYSICAL or LOGICAL recovery of queue records after a failure.
  • FACILITYID - for INDIRECT queues, the real queue this name points to.

Automatic transaction initiation (ATI)

  • Set TRIGLEVEL(n) and ATITRANID on an INTRA queue definition.
  • Each WRITEQ TD adds a record. When the count reaches n, CICS starts the ATI transaction automatically.
  • The triggered transaction reads the records with READQ TD and processes them - a classic print or batch-feed pattern.
  • ATI only fires for INTRA queues with a trigger level defined; EXTRA queues never trigger.

Example - define an INTRA queue that triggers a print transaction every 50 records:

CEDA DEFINE TDQUEUE(PRTQ) GROUP(ORDGRP) TYPE(INTRA) TRIGLEVEL(50) ATITRANID(PRTP) ATITERMID(PRT1) RECOVSTATUS(LOGICAL) CEDA INSTALL GROUP(ORDGRP)





© copyright mainframebug.com
Privacy Policy
MainframeBug Assistant