Diagnosing VSAM File Status 92 and 93: Enqueue Locks & Dynamic Allocation Contention
Quick Diagnostic Summary: What Causes Diagnosing VSAM File Status 92 and 93: Enqueue Locks & Dynamic Allocation Contention?
VSAM File Status 92 indicates a logic error (e.g. attempting to OPEN an already opened file), while File Status 93 signals resource contention (dataset locked by CICS or another batch job). Learn how to diagnose exclusive enqueue locks and configure non-disruptive access.
1 Incident Symptoms: What Triggers Diagnosing VSAM File Status 92 and 93: Enqueue Locks & Dynamic Allocation Contention?
A batch job updating a critical VSAM Key Sequenced Data Set (KSDS) fails with:
PROG010: ERROR OPENING VSAM FILE 'PROD.KSDS.CUSTOMER'
FILE STATUS = 93
CEE3250C The system or user abend U4038 was issued.
Or in an online CICS transaction:
FILE STATUS = 92 ON OPEN
CICS RESP=NOTOPEN (RESP2=12)
Production schedules back up while operators scramble to determine which job or CICS region holds the dataset lock.
2 Technical Root Cause & Architecture Mechanics
In COBOL execution against VSAM clusters:
1. File Status 92 (Logic Error): Occurs when a program attempts an operation that violates VSAM state logic:
- Issuing
OPENon a file that is already open. - Issuing
READ NEXTwithout a successful priorSTARTorREAD. - Issuing
REWRITEwithout a prior successfulREADwith lock.
2. File Status 93 (Resource Unavailable / Exclusive Enqueue): Occurs when:
- The dataset is allocated with
DISP=OLDorDISP=SHRwithoutSHAREOPTIONS(2,3)or(3,3)in the IDCAMS cluster definition. - A CICS region holds an exclusive open lock (
FCTstatusOPEN, ENABLED) for updates, and a batch job attempts to open the dataset for output (OPEN I-OorOPEN EXTEND). - MVS GRS (Global Resource Serialization) holds major name
SPFDSNorSYSDSNon the cluster.
3 Step-by-Step Diagnostic & Code Resolution
# 1. Identify Who Holds the Dataset Lock via TSO / SDSF
From the MVS master console or SDSF, issue:
/D GRS,RES=(*,PROD.KSDS.CUSTOMER)
Output reveals the job or CICS region holding the exclusive enqueue:
ISV001I GRS STATUS:
JOBNAME: CICSPROD STATUS: EXCLUSIVE MAJOR: SYSDSN
JOBNAME: BATCHJOB STATUS: WAITING
# 2. Configure CICS CEMT to Close the File for Batch
Before running the batch update, close and disable the file in CICS:
CEMT SET FILE(CUSTFILE) CLOSED DISABLED
Once batch finishes, reopen:
CEMT SET FILE(CUSTFILE) OPEN ENABLED
# 3. Review IDCAMS SHAREOPTIONS
Inspect the cluster definition:
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENT('PROD.KSDS.CUSTOMER') ALL
/*
Check SHAREOPTIONS:
-
SHAREOPTIONS(1 3): Only one job can write; multiple jobs can read only if no one is writing. -
SHAREOPTIONS(2 3): Multiple jobs can read concurrently while one job writes. -
SHAREOPTIONS(3 3): Multiple jobs can write concurrently (requires application-level lock coordination or VSAM RLS).
To adjust without deleting:
//STEP1 EXEC PGM=IDCAMS
//SYSIN DD *
ALTER PROD.KSDS.CUSTOMER SHAREOPTIONS(2 3)
/*
# 4. Fix Logic in COBOL Code for Status 92
Ensure the program checks file status flags before issuing OPEN:
IF WS-FILE-IS-OPEN = 'N'
OPEN I-O CUSTOMER-FILE
IF WS-CUST-STATUS = '00'
MOVE 'Y' TO WS-FILE-IS-OPEN
ELSE
PERFORM 9900-HANDLE-OPEN-ERROR
END-IF
END-IF.
Diagnostic Reference Matrix
| Attribute | Specification |
|---|---|
| Target Subsystem | IBM z/OS 2.4 - 3.1 • CICS & VSAM Architecture |
| Error Signature | VSAM, File Status 92, File Status 93 |
| Resolution SLA | < 15 Minutes via Verified StackMF Runbook |
| Technical Reviewer | Anshu, Chief Technology Architect • StackMF Architecture Pod |
Architectural Prevention & Performance Tuning Checklist
- Use VSAM Record-Level Sharing (RLS) to allow concurrent updates from both batch and CICS.
- Automate CICS file close/open sequences using CA-7 or modern schedulers like Stonebranch before batch execution.
- Always verify file status variables immediately after every I/O statement in COBOL.
- Never use `DISP=OLD` in batch JCL when `DISP=SHR` satisfies requirements.
? Frequently Asked Questions
What is the root cause of Diagnosing VSAM File Status 92 and 93: Enqueue Locks & Dynamic Allocation Contention? ↓
How do you resolve Diagnosing VSAM File Status 92 and 93: Enqueue Locks & Dynamic Allocation Contention in production? ↓
How can teams prevent Diagnosing VSAM File Status 92 and 93: Enqueue Locks & Dynamic Allocation Contention in enterprise pipelines? ↓
Recommended Technical Runbooks
Eliminating Performance Degradation from VSAM KSDS CI/CA Splits: IDCAMS REORG Automation
Implementing VSAM Record-Level Sharing (RLS) for Concurrent Batch and CICS Access
Troubleshooting VSAM File Status 35: Dataset Not Found during Dynamic Allocation in Batch & CICS
Authoritative Reference Documentation
Official IBM manuals, Redbooks, and vendor technical advisories:
This diagnostic runbook is published by StackMF Technologies LLP for educational and architectural reference only. All code snippets, JCL, and procedures are provided "AS IS" without warranty of any kind. Always test changes thoroughly in non-production sysplex environments prior to production rollout.
IBM, z/OS, CICS, Db2, IMS, RACF, and IDz are registered trademarks of International Business Machines Corporation. Broadcom, CA-7, and Endevor are trademarks of Broadcom Inc. All other trademarks belong to their respective owners and are referenced under the Nominative Fair Use Doctrine (US Lanham Act 15 U.S.C. ยง 1125 / Section 30 of the Indian Trade Marks Act, 1999) solely for technology compatibility and diagnostic identification. StackMF Technologies LLP is an independent consulting entity not affiliated with or endorsed by these vendors. View Full Legal & IP Policy →
Struggling with Critical Mainframe Incidents or Vendor Renewal Pressure?
StackMF deploys certified Senior Mainframe Engineers fluent in both z/OS legacy internals (COBOL, DB2, CICS, VSAM, CA-7, Endevor) and modern cloud stacks (React, Kafka, AWS, Git). Onboard dedicated pods in 48 hours or cut Broadcom licensing by 60%.