Use the SQLCODE modifier keyword when an incorrect output
problem occurred in response to an SQL statement, the SQLCODE was
not issued because of a user error, and the SQLCA is available.
Procedure
To use the SQLCODE modifier keyword:
- Locate the SQLCA.
- Locate the three-digit decimal SQL code that follows the
label
SQLCODE. Find any variables in the SQLCODE
message, such as the name of an unavailable resource.
- Find any additional relevant information that can be present.
The format and contents of the SQLCA varies from problem to problem.
Check for the following information:
- Any CSECT names that follow the label
SQLERRP.
- Any meaningful 4-byte hexadecimal subcodes that follow the label
SQLERRD.
There are six such subcode fields. Find only those fields whose values
do not equal X'00000000' or X'FFFFFFFF'.
- Build a keyword that is based on the relevant data that
was collected. Include the SQL return code and any pertinent CSECT
names, message variables, and subcodes. The SQL return code should
appear similar to SQLCODExxx,
with xxx indicating the three-digit code
with the minus sign omitted. Add this information to the keyword
string and turn to Searching for known problems and solutions for Db2 for z/OS.
(free format):
5740XYR00 R131 INCORROUT SQL CREATE SQLCODE901
DSNHPA RC0000C901
(structured format):
PIDS/5740XYR00 LVLS/131 INCORROUT
PCSS/SQL PCSS/CREATE FLDS/SQLCODE901
RIDS/DSNHPA PRCS/0000C901