8/8/2019 Abend Codes for Jcl, Vsam
Abend Codes
JCL
S0CB - Attempting to divide by 0 and not using ON SIZE ERROR
S002 - Very large record length/ wrong record length
Sx22 - Job has been cancelled. The value of x will vary depending on the way
the job was cancelled. S222 means job was cancelled by a user or operator without
a dump. If a TSO session times out you will probably get an S522 abend code.
S222 - The job was cancelled (by subsystem or operator) because it violated
some restri ction
S522 - JOB or TSO session exceeded maximum job wait time OR
operator did not mount the require tape within allowed time limit
S806 - Load module not found
S837 - Space problem, Alloted space is not enough for data set
S913 - You are trying to access a dataset which you are not authorized to use.
SOC7 - 1. Moving non -numeric value to numeric field
2. Not initilizing the numeric variables before first use
SOC4 - 1. Index exceeds the size of tab le
2. Trying to use File Section variables without opening the file
S0C1 - Operation Exception. Check for subscript errors, missing DD card, file
not opened.
SE37 - Insufficient disk space.
U1026 - COBOL sort failed.
U1056 - Program didn't close a file before ending
VSAM
00 - SUCCESSFUL COMPLETION
02 - DUPLICATE KEY, NON UNIQUE ALT INDEX
04 - READ, WRONG LENGTH RECORD
05 - OPEN, FILE NOT PRESENT
10 - END OF FILE
20 - INVALID KEY VSAM KSDS OR RRDS
21 - SEQUENCE ERROR, ON WRITE OR CHANGING KEY ON REWRITE
22 - DUPLICATE KEY
23 - RECORD NOT FOUND - (when we are trying to access a record with key)
or
FILE NOT FOUND
http://slidepdf.com/reader/full/abend-codes-for-jcl-vsam 1/2
8/8/2019 Abend Codes for Jcl, Vsam
35 - OPEN, FILE NOT PRESENT
When we will use this code in our program?
There are situations where file should be read if exists, write if it
does not when you dont know whether file exists are not , first you
will open file in I -O mode and check status code. if it is 35 then open
that file for output file. other wise you will continue with your logic
41 - OPEN, FILE IS OPEN
42 - CLOSE, FILE IS CLOSED
43 - DELETE OR REWRITE & NO GOOD READ FIRST
46 - SEQUENTIAL READ WITHOUT POSITIONING
47 - READING FILE NOT OPEN AS INPUT/IO/EXTEND
48 - WRITE WITHOUT OPEN IN IO MODE
49 - DELETE OR REWRITE WITHOUT OPEN IN IO MODE
92 - LOGIC ERROR/OPENING AN OPEN FILE
OR READING OUTPUT FILE
OR WRITE INPUT FILE
OR DEL/REW BUT NO PRIOR READ
94 - SEQUENTIAL READ AFTER END OF FILE
OR NO CURRENT REC POINTER FOR SEQ
96 - MISSING DD STATEMENT IN JCL
97 - OPEN OK, FILE INTEGRITY VERIFIED
When we will use this in our programs?
We use this code whenever we open the file, if status code is 00 or 97
we will proceed with our logic, otherwise, call error routine.
Usaully, it may come when file was not closed.
for example
IF WS-FILE-STATUS NOT = '00' AND '97'
PERFORM ERROR -ROUTINE
END-IF.
http://slidepdf.com/reader/full/abend-codes-for-jcl-vsam 2/2