Troubleshooting
Problem
COBOL program specifies ACCESS=DYNAMIC for VSAM file that is defined on DD card as using SUBSYS=(BLSR....).
The sequence of VSAM program calls made by the COBOL program caused some to be SEQUENTIAL access and some to be DIRECT access.
If Direct calls are done, adding DEFERW=YES to the BLSR DD parms, will greatly reduce IO's and shorten job run time.
DEFERW=YES causes deferred write of buffers for DIRECT VSAM calls. (Seq VSAM calls always defer writes)
Symptom
COBOL program was doing WRITE (which failed with duplicate key), then REWRITE which results in 3 SEQ VSAM calls ( POINT, GET, PUT), then repeating this loop for the next key in the file.
After a WRITE that fails, the next COBOL WRITE will result in a DIRECT VSAM PUT (per COBOL design).
Since almost all the WRITE's failed with "duplicate key error", all the subsequent WRITEs became DIRECT VSAM PUT calls.
All Direct VSAM PUTs will immediately write out buffers unless Deferred Writes is specified.
Therefore, there was much extra I/O and job run time was lengthy.
Cause
It is optimum to have COBOL Sequential Access to a VSAM file, which implies deferred writes of the buffers until they are full.
If you must use COBOL Dynamic or Random access, then it is best to use LSR buffering with Deferred Writes, both specified on the ACB MACRF for the file.
Environment
COBOL programs using VSAM files using Dynamic or Random Access.
Diagnosing The Problem
A VSAM Record management trace of the job showed the sequence of calls and the type of calls.
Resolving The Problem
The BLSR SUBSYS parm on the DD for the VSAM file was changed to add DEFERW=YES.
The complete PARM was: SUBSYS=BLSR,'DDNAME=SEFILEDD','BUFND=30',BUFNI=10','DEFERW=YES')
The complete PARM was: SUBSYS=BLSR,'DDNAME=SEFILEDD','BUFND=30',BUFNI=10','DEFERW=YES')
Related Information
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG90","label":"z\/OS"},"Component":"5695DF106 - DFSMS VSAM","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"1.1;1.2;1.3;1.4;1.5;1.6;1.7;1.8;1.9;1.10;1.11;1.12;1.13;2.1;2.2;2.3;2.4","Edition":"","Line of Business":{"code":"LOB56","label":"Z HW"}}]
Was this topic helpful?
Document Information
Modified date:
03 September 2021
UID
isg3T1019940