Subscribe
THE DAILY DIGEST

The daily edition.

Essential reading from Rocket Enterprise. Straight to the source.

Archived edition
DAILY EDITION1 story· 4 min read

CICS Temporary Storage (TSQ) & Transient Data (TDQ) Queue Management

Mainframe CICS applications rely on two distinct queuing mechanisms to pass data across tasks, programs, and time intervals:

IN FOCUS

CICS Temporary Storage (TSQ) & Transient Data (TDQ) Queue Management

Mainframe CICS applications rely on two distinct queuing mechanisms to pass data across tasks, programs, and time intervals: [1]

Read the full briefing

1. What It Is & The Problem It Solves

Mainframe CICS applications rely on two distinct queuing mechanisms to pass data across tasks, programs, and time intervals:

  • Temporary Storage Queues (TSQs): Scratchpad queues allowing random or sequential access by record item number (EXEC CICS WRITEQ TS, READQ TS, DELETEQ TS). They can be held transiently in memory or persisted to disk.
  • Transient Data Queues (TDQs): Sequential, destructive-read queues (EXEC CICS WRITEQ TD, READQ TD) used for event routing, auditing, batch job triggering, and external reporting. TDQs divide into Intrapartition (internal to the region or cluster) and Extrapartition (mapping to external host datasets or spool files).

When rehosting CICS applications to distributed open systems or multi-region clusters, managing these queues concurrently across multiple Service Execution Processes (SEPs) without data loss, deadlocks, or state corruption across warm/cold restarts requires robust subsystem emulation and resource definition (CICS Resource Definitions - Rocket Software Documentation). Rocket Enterprise Server delivers full mainframe queue fidelity, supporting logical recovery, trigger-level automation, and cluster-wide distribution.

2. Practical Development & Runtime Architectural Advantages

  • Main vs. Auxiliary Storage for TSQs:
    • MAIN Storage: Stored in high-speed shared memory for ephemeral scratchpad data needed within short transaction chains. It incurs minimal overhead but does not survive region termination.
    • AUXILIARY Storage: Written to physical disk structures, Fileshare, or relational datastores. It persists across tasks and can be restored during warm region restarts.
  • Intrapartition TDQs & Automatic Transaction Initiation (ATI): Intrapartition TD queues support Automatic Transaction Initiation (ATI) controlled by a defined TRIGGERLEVEL (CICS Resource Definitions - Rocket Software Documentation). When the count of committed records in the queue reaches the threshold, Enterprise Server automatically spawns an asynchronous CICS task (specified by TRANSID) to process and drain the queued records without external scheduling logic.
  • Extrapartition TDQs for Batch/Online Bridging: Extrapartition queues map directly to host flat files or sequential datasets defined in the Destination Control Table (DCT / DEFINE TDQUEUE). This provides a direct, native mechanism for online CICS transactions to log audit trails, produce print reports, or stage input streams consumed by background JES batch jobs.
  • Cluster Sharing via Scale-Out Repository (SOR) Models: In scale-out Performance and Availability Clusters (PAC), local file storage creates isolation between nodes. Administrators can use SOR Models to route non-recoverable TS and TD queues to shared Redis or Oracle Coherence backends, enabling any region in the cluster to write or read common queue data seamlessly (Scale-Out Repository (SOR)).
  • Syncpoint Participation & Logical Recovery: Queues defined as Recoverable in the System Initialization Table (SIT) participate in Two-Phase Commit / CICS syncpoint processing. If an application encounters an abend or executes an explicit EXEC CICS SYNCPOINT ROLLBACK, all queue updates and reads performed within the in-flight unit of work are rolled back automatically (Specifying Fileshare Servers in the RDF).

3. Key Directives, Configuration & Syntax

  1. CSD Queue Resource Definitions (DEFINE TDQUEUE & DEFINE _TEMPSTORAGE): Queues are defined in ESMAC or via command line (CICS Resource Definitions - Rocket Software Documentation):
* Define an intrapartition TDQ with Automatic Transaction Initiation (ATI)
DEFINE TDQUEUE(AUDT) GROUP(ACCTGRP)
       TYPE(INTRA)
       TRIGGERLEVEL(10)
       TRANSID(PRNT)
       RECOVERY(LOGICAL)
  1. System Initialization Table (SIT) Configuration in ESCWA: In ESCWA under Operation > Directory Server > [Region] > CICS > SIT, configure storage servers and paths for the four queue recovery categories (Specifying Fileshare Servers in the RDF, Accessing an Individual Dataset via FiIeshare):
    • Recoverable Temporary Storage
    • Non-recoverable Temporary Storage
    • Recoverable Intrapartition Transient Data
    • Non-recoverable Intrapartition Transient Data
  2. COBOL Application Syntax Examples:
* Writing a scratchpad record to a Temporary Storage Queue in main memory
EXEC CICS WRITEQ TS
    QUEUE('SCRP001')
    FROM(WS-SCRATCHPAD-RECORD)
    LENGTH(LENGTH OF WS-SCRATCHPAD-RECORD)
    MAIN
    RESP(WS-RESP)
END-EXEC.

* Writing to an event TD queue to trigger downstream batch/print processing
EXEC CICS WRITEQ TD
    QUEUE('AUDT')
    FROM(WS-AUDIT-RECORD)
    LENGTH(LENGTH OF WS-AUDIT-RECORD)
    RESP(WS-RESP)
END-EXEC.

4. Reference Citations (Rocket Documentation 12.0)

5. Mem0 Memory Indexing Confirmation

This technical insight has been indexed into Mem0:

  • Memory ID: 86865f2c-1b72-4eaa-87bb-13eb941b32a6
  • Topic: CICS TSQ and TDQ Queue Management
  • Category: MSS - CICS
  • Scope / Domain: runtime / rocket-enterprise-suite (v12.0)
Enterprise Server · 12.0 · Linux/UNIX
Documentation references
That’s the briefing.You’ve reached the end of this edition.
More editions

From the archive

View all
Oct 1

Copybook Resolution (COBCPY) & Directive Files (cobol.dir)

Sep 30

External File Handler (ExtFH) Directives & Configuration (extfh.cfg)

Sep 29

OpenESQL & Host Compatibility Options (HCO) in Enterprise Developer