SQLCODE modifier keyword

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:

  1. Locate the SQLCA.

    Finding the SQLCA describes how to locate the SQLCA in a dump.

    An example appears in Finding the SQLCA.
  2. 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.
  3. 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'.
  4. 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