Beruflich Dokumente
Kultur Dokumente
00 - Successful
+100 - End of cursor / Successful Row not found
-104 - SQL Syntax Error
-180 to -189 String representation of DATE, TIIME, TIMESTAMP is
invalid / format error
-204 - Object not defined to DB2 / Table or Column not
found
-205 - Column name not in specified DB2 table
-206 - Column does not exist in any table in the SELECT
-302 to -309 Type mismatch error
-501 - Fetch without opening the Cursor
-530 to –542 Referential Integrity Error
-551 - Not authorized to access DB2
-803 - Unique index violation. Try to insert duplicate
record (Duplicate Error)
-805 - Invalid Plan. DBRM or PACKAGE not found in PLAN
-811 - Cursor should be used, when more than one row
returned as a result of a singleton
SELECT query
-818 - Timestamp mismatch between plan and load module
-904 - Resources not found
-911 - Deadlock with rollback
-913 - Deadlock without rollback
-923 - DB2 Down
-925 - SQL commit used in CICS program
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
35 - OPEN, FILE NOT PRESENT
When we will use this code in our program?
There are situations where file should be read if exist,
write if it does not when you don’t 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
39 - LOGIC ERROR
41 - OPENING A FILE THAT IS ALREADY OPENED
42 - CLOSEING A FILE WITHOUT OPEN.
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 A OPEN FILE / READING
OUTPUT FILE / WRITING INTO
A INPUT FILE / DEL or REW BUT NO PRIOR READ
94 - SEQUENTIAL READ AFTER END OF FILE / 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,
other wise, call error routine. Usually, it may
come when file was not closed.
for example,
ABEND CODES :
SQLCODE -216
You need to use the same number of expressions on
both sides of the comparison.
when using multiple operands in a comparison,
Correct example:
WHERE (E.SALARY, E.COMM) IN
(SELECT S.PAY, S.COMMISSION
Incorrect example:
WHERE (E.SALARY, E.COMM, E.BONUS) IN
(SELECT S.PAY, S.COMMISSION
SQLCODE -805
DBRM or package not found in plan
Is plan name correct?