Post #1
1 votes
Sam
Reputation
5
Posts: 28
Joined: Jul 1, 2026, 2:30 PM
Posted: Jul 27, 2026, 1:37 PM
COBOL DB2 examples always say IF SQLCODE = 0 ... What are the common values I should memorize first?
COBOL DB2 examples always say IF SQLCODE = 0 ... What are the common values I should memorize first?
0 = ok
+100 = no row found (not always an error)
negative = real problem (-803 duplicate, -911 deadlock/timeout, -305 null, etc)
Always check it. Ignoring SQLCODE is how you process garbage and smile.
DISPLAY SQLCODE in test when something feels wrong. Cheap debugging.
You must be signed in to reply to this thread