Master Mainframe Technologies - COBOL, JCL, DB2, VSAM, CICS & More
ABEND Codes SQLCODEs File Status Interview Prep Contact
🖮 CICS

CICS Temporary Storage

Intermediate 🕑 15 min read 👁 1 views

15

Code Example


## CICS Temporary Storage

Store and retrieve temporary data.

### Temporary Storage Queues (TSQ)
- Named storage areas
- Multiple records (items)
- Recoverable or non-recoverable

### Main vs Auxiliary
- MAIN: Memory (faster)
- AUXILIARY: Disk (survives restart)

### Commands
| Command | Purpose |
|---------|---------|
| WRITEQ TS | Write item |
| READQ TS | Read item |
| DELETEQ TS | Delete queue |

### Queue Naming
Typically: Transaction ID + Terminal ID
\`\`\`cobol
STRING EIBTRNID EIBTRMID INTO WS-QNAME
\`\`\`

### Item Numbers
- ITEM(n): Specific item
- NUMITEMS: Total count
- REWRITE: Update item