TDINFRPC

Description

Returns information about the current client request.

Syntax

COPY SYGWCOB.
01 TDPROC       PIC S9(9)USAGE COMP SYNC.
01 RETCODE      PIC S9(9)USAGE COMP SYNC.
01 REQUEST–TYPE PIC S9(9)USAGE COMP SYNC.
01 RPC–NAME     PIC X(30). 
01 COMM–STATE   PIC S9(9)USAGE COMP SYNC.
CALL 'TDINFRPC' USING TDPROC, RETCODE, REQUEST–TYPE,
                RPC–NAME, COMM-STATE.

Parameters

TDPROC

(I) Handle for this client/server connection. This must be the same value specified in the associated TDACCEPT call. The TDPROC handle corresponds to the connection and command handles in Open Client Client-Library.

RETCODE

(O) Variable where the result of function execution is returned. Its value is one of the codes listed in Table 3-19.

REQUEST-TYPE

(O) Type of request being accepted. Returns one of the following values:

TDS-LANGUAGE-EVENT (1)

Current request is a language request.

TDS-RPC -EVENT (3)

Current request is an RPC.

TDS-DYNAMIC-EVENT (4)

Current request is a dynamic SQL request.

TDS-CURSOR-EVENT (5)

Current request is a cursor request.

TDINFPGM and TDGETREQ also return this information.

NoteThese are new values. The old values (TDS-START-SQL and TDS-START-RPC) still work, but you should use the new values from now on.

RPC-NAME

(O) Variable where the name of the current client RPC is returned. If the client request is not an RPC, this field contains blanks.

COMM–STATE

(O) Variable where the current communication state of the mainframe transaction is stored. COMM–STATE is one of the following values:

TDS-RESET (0)

Client/server conversation for this transaction ended. If the current transaction is running under CICS or uses the IMS TM explicit API, the transaction should exit as soon as possible. If the current transaction is a WFI transaction using the IMS TM implicit API, the transaction can accept another client request by calling TDGETREQ.

TDS-SEND (1)

Transaction is in SEND state.

TDS-RECEIVE (2)

Transaction is in RECEIVE state.

TDSTATUS also returns this information.

See “Communication states” for an explanation of communication states.

Returns

The RETCODE argument can contain any of the return values listed in Table 3-19.

Table 3-19: TDINFRPC return values

Return value

Meaning

TDS-OK (0)

Function completed successfully.

TDS-CONNECTION-TERMINATED (-4997)

Connection closed. The remote partner closed (deallocated) the client/server connection.

Usage

See also

Related functions

Related topics