DDF error messages

A distributed request can run unsuccessfully for a number of reasons.

  • Local DDF is not started.
  • Remote DDF is not started (if the remote system is a Db2).
  • Remote system is not started.
  • VTAM® LU is not active.
  • VTAM path errors occurred.
  • VTAM failure occurred.
  • Session or conversation failures occurred.
  • Db2 communications database entries are incorrect.
  • Security failure occurred.
  • TCP/IP failure occurred.

Resource unavailable messages for DDF

For some errors in the distributed environment, the Db2 user or application receives:

     SQLCODE -904; RESOURCE UNAVAILABLE

The following is returned to the user in the SQLCA: The Db2 reason code, a code that describes the type of the resource that is unavailable, and the resource name. Distributed data facility reason codes start with '00D3'.

RESOURCE TYPES for errors in a distributed environment are:

  • 00001000 DDF
  • 00001001 System conversation
  • 00001002 Agent conversation
  • 00001003 CNOS processing
  • 00001004 Communications database
  • 00001005 Database access agent
  • 00001007 TCP/IP domain name
  • 00001008 TCP/IP service name

VTAM resource information

For VTAM connections, the RESOURCE NAME contains:

  • LU-name
  • VTAM logon mode name
  • VTAM return codes
  • SNA sense data.

Four VTAM return codes are displayed in the Db2 error message:

  • RTNCD: VTAM primary return code
  • FDBK2: VTAM secondary return code
  • RCPRI: APPC primary return code
  • RCSEC: APPC secondary return code.

The SNA sense data is 4 bytes long and consists of:

  • BYTE 0 + 1: Sense code: Category (Byte 0) and Modifier (Byte 1)
  • BYTE 2 + 3: Sense code-specific information.
Figure 1. SNA sense data
Begin figure description. This figure displays the sense data: byte 0 and byte 1. Byte 0 is the category and byte 1 is the modifier. End figure description.

The SNA sense data categories are:

  • X'00': User sense data only (not for LU 6.2)
  • X'08': Request reject
  • X'10': Request error
  • X'20': State error
  • X'40': Request header (RH) usage error
  • X'80': Path error.

If RTNCD contains '00' and FDBK2 contains '0B', the requested VTAM function was unsuccessful and RCPRI and RCSEC should be analyzed. Together with the SNA sense data, the problem can be identified.

Figure 2. Db2 DDF error message in VTAM environment -- resource unavailable
  CNOS processing for LU 'LUDBD1' (which is DB2 system 'SYDNEY') and VTAM logon
  mode 'SYSTOSYS' was unsuccessful.  The VTAM return codes must be analyzed:
   --------------------------------------------------------------------------------
   SELECT * FROM SYDNEY.SYSIBM.SYSCOLUMNS;
   --------------------------------------------------------------------------------
   DSNT408I SQLCODE = -904, ERROR:  UNSUCCESSFUL EXECUTION CAUSED BY AN
            UNAVAILABLE RESOURCE. REASON 00D31029, TYPE OF RESOURCE 00001003, AND
            RESOURCE NAME LUDBD1.SYSTOSYS.00.0B.0008.0001.08570003
   DSNT415I SQLERRP = DSNLXCNV SQL PROCEDURE DETECTING ERROR
   DSNT416I SQLERRD = 900  0  0  0  0  0 SQL DIAGNOSTIC INFORMATION
   DSNT416I SQLERRD = X'FFFFFC7C'  X'00000000'  X'00000000'  X'00000000'
            X'00000000'  X'00000000' SQL DIAGNOSTIC INFORMATION
   ----------------------------------------------------------------------------------
   DSNE618I ROLLBACK PERFORMED, SQLCODE IS 0
   DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0
   --------------------------------------------------------------------------------
    The DB2 error message is shown below:
   DSNT408I SQLCODE = -904, ERROR:  UNSUCCESSFUL EXECUTION CAUSED BY AN
            UNAVAILABLE RESOURCE. REASON 00D31029, TYPE OF RESOURCE 00001003,AND
            RESOURCE NAME LUDBD1.SYSTOSYS.00.0B.0008.0001.08570003
  SQLCODE -904, RESOURCE UNAVAILABLE, tells that the SQL statement
  could not be executed, because a specific resource was not available at the
    time the statement was executed:
           +------------------------------------------------------------+
   DSNT408I|SQLCODE = -904, ERROR:  UNSUCCESSFUL EXECUTION CAUSED BY AN |
           |                     +--------------------------------------+
           |UNAVAILABLE RESOURCE.|
           +---------------------+
    DB2 reason code X'00D31029' tells that the requested VTAM function to allocate
    a conversation failed (VTAM returned a non-zero return code):
           +---------------+
           |REASON 00D31029|
           +---------------+
    Code '00001003' defines the resource type of 'CNOS processing':
           +-------------------------+
           |TYPE OF RESOURCE 00001003|
           +-------------------------+
    Because the VTAM function to perform CNOS processing failed,
    the specific resource name must be analyzed.
    The combination of RTNCD/FDBK2 '00/0B' tells that the VTAM function
    was unsuccessful and the APPC codes should be analyzed.
    The combination of RCPRI/RCSEC '0008/0001' tells that a conversation
    cannot be allocated.  The SNA SENSE field '08570003' tells that the
    SSCP-SLU session is not active.
    In other words, DDF of 'SYDNEY' is not active.
           +------------------------------------------------------+
           |RESOURCE NAME LUDBD1.SYSTOSYS.00.0B.0008.0001.08570003|
           +------------------------------------------------------+
                            |       |      |  |   |    |      |
                            |       |      |  |   |    |      |
    LUNAME <----------------+       |      |  |   |    |      |
    Logon Mode Name <---------------+      |  |   |    |      |
    RTNCD (VTAM primary return code) <-----+  |   |    |      |
    FDBK2 (VTAM secondary return code) <------+   |    |      |
    RCPRI (APPC primary return code) <------------+    |      |
    RCSEC (APPC secondary return code) <---------------+      |
    SENSE (SNA sense code) <----------------------------------+

TCP/IP resource information

For TCP/IP connections, the RESOURCE NAME contains:
  • Value in column LINKNAME in table SYSIBM.IPNAMES
  • Value in column IPADDR in table SYSIBM.IPNAMES
  • TCP/IP error code from socket call gethostbyname or getservbyname
if the resource is a TCP/IP domain name, or
  • Value in column LOCATION in table SYSIBM.LOCATIONS
  • Value in column PORT in table SYSIBM.LOCATIONS
  • TCP/IP error code from socket call gethostbyname or getservbyname
if the resource is a TCP/IP service name.

Example TCP/IP and Db2 error messages

The following figure shows an example of messages you receive on the z/OS® console when a local Db2 subsystem attempts to connect to a remote Db2 subsystem, but DDF is down on the remote system.

Figure 3. Analyzing Db2 and TCP/IP error message on z/OS console
 DSNL511I ? DSNLIENO TCP/IP CONVERSATION FAILED
            TO LOCATION STLEC1B
            IPADDR=9.112.126.120 PORT=447
            SOCKET=CONNECT RETURN CODE=1128 REASON CODE=12F80291

Message DSNL511I indicates that the TCP/IP CONNECT socket call failed. The CONNECT call establishes a connection between the socket for the local Db2 and the socket for the remote Db2. The IPADDR and PORT values are for the remote Db2.