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.
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.
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.
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.