TDLSTSPT

Description

Lists transactions for which tracing is enabled.

Syntax

%INCLUDE SYGWPLI;
01 IHANDLE 				PTR,
01 RETCODE             FIXED BIN(31),
01 TRACE_TABLE_LIST(8) CHAR(08);
CALL TDLSTSPT (IHANDLE, RETCODE, TRACE_TABLE_LIST);

Parameters

IHANDLE

(I) A transaction-wide structure that contains information used to set up the Gateway-Library environment. This must be the same IHANDLE specified in the program’s initial TDINIT call. It corresponds to the context structure 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-23.

TRACE_TABLE_LIST

(O) An array listing the contents of the trace table. Each element of this array, TRANSID_n, returns the transaction ID of a transaction for which specific tracing is currently enabled.

Under CICS: This is the TRANSID from the CICS Program Control Table (PCT).

Under IMS TM: This is the transaction name defined when the system is generated.

Under MVS: This is the APPC transaction name of the MVS transaction.

Returns

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

Table 3-23: TDLSTSPT return values

Return value

Meaning

TDS_OK (0)

Function completed successfully.

TDS_INVALID_IHANDLE (-19)

Invalid IHANDLE specification. Error in specifying a value for the IHANDLE argument.

TDS_INVALID_PARAMETER (-4)

Invalid parameter value. The value assigned to one or more of the arguments supplied in the call is not valid. The operation failed.

Examples

Example 1

The following code fragment illustrates the use of TDLSTSPT to determine which transactions have tracing enabled. It returns the transaction IDs to the caller. This example is taken from the sample program in Appendix G, “Sample Tracing and Accounting Program,” which runs under CICS.

 	 /*------------------------------------------------------------*/
       	INITIALIZE_PROGRAM:
  	 /*------------------------------------------------------------*/
          CALL TDINIT (DFHEIBLK, GWL_RC, GWL_INIT_HANDLE);
 
          CALL TDACCEPT (GWL_PROC, GWL_RC, GWL_INIT_HANDLE,
          	SNA_CONNECTION_NAME, SNA_SUBC);
 
          CALL TDINFRPC (GWL_PROC, GWL_RC, GWL_REQ_TYPE, GWL_RPC_NAME,
                         GWL_COMM_STATE);
 
          IF GWL_RC NE TDS_PARM_PRESENT THEN
          DO;
              SEND_DONE       = SEND_DONE_ERROR;
              MSG_SRVLIB_FUNC = 'TDINFRPC';
              GO TO END_PROGRAM;
          END;
  	 /*------------------------------------------------------------*/
	    GET_PARM:
  	 /*------------------------------------------------------------*/
          CALL TDRCVPRM (GWL_PROC, GWL_RC, GWL_RCVPRM_ID,
                         PARM_REQUEST, TDSCHAR, 
                         GWL_RCVPRM_MAX_DATA_L, GWL_RCVPRM_DATA_L);
          IF PARM_REQUEST = PARM_REQUEST_INFACT THEN
              CALL TDINFACT_PROC;
 
          ELSE IF PARM_REQUEST = PARM_REQUEST_LSTSPT THEN
              CALL TDLSTSPT_PROC;
 
	 /*------------------------------------------------------------*/
        	TDLSTSPT_PROC: PROC;
  	 /*------------------------------------------------------------*/
          WRKLEN1         = STG(WRK_TRANID);
          WRKLEN2         = STG(CN_LSTSPT_TRANID);
          CTR_COLUMN      = CTR_COLUMN +1;
          MSG_SRVLIB_FUNC = 'TDESCRIB';
 
          CALL TDESCRIB (GWL_PROC, GWL_RC,
                         CTR_COLUMN,
                         TDSCHAR,
                         WRKLEN1,
                         WRK_TRANID,
                         TDS_ZERO,
                         TDS_FALSE,
                         TDSCHAR,
                         WRKLEN1,
                         CN_LSTSPT_TRANID,
                         WRKLEN2);
 
          IF GWL_RC NE TDS_OK THEN
          DO;
              SEND_DONE = SEND_DONE_ERROR;
              GO TO TDLSTSPT_EXIT;
          END;
 
  	 /*      ------------------------------------------------------*/
  	 /*      find global status                                    */
  	 /*      ------------------------------------------------------*/
          CALL TDINFLOG (GWL_INIT_HANDLE, GWL_RC,
	 GWL_INFLOG_GLOBAL,
	 GWL_INFLOG_API,
	 GWL_INFLOG_HEADER,
	 GWL_INFLOG_DATA,
	 GWL_INFLOG_TRACEID,
	 GWL_INFLOG_FILENAME,
	 GWL_INFLOG_RECORDS);
  	 /*      ------------------------------------------------------*/
  	 /*      if any error, then assume tracing disabled            */
  	 /*      ------------------------------------------------------*/
          IF GWL_RC NE TDS_OK THEN
          DO;
              SEND_DONE       = SEND_DONE_ERROR;
              MSG_SRVLIB_FUNC = 'TDINFLOG';
              GO TO TDLSTSPT_EXIT;
          END;
  	 /*      ------------------------------------------------------*/
  	 /*      if not specific tracing, then return nothing          */
  	 /*      ------------------------------------------------------*/
          IF GWL_INFLOG_GLOBAL NE TDS_TRACE_SPECIFIC_RPCS THEN
              GO TO TDLSTSPT_EXIT;
  /*      ------------------------------------------------------*/
  /*      return rows                                           */
  /*      ------------------------------------------------------*/
          CALL TDLSTSPT (GWL_INIT_HANDLE, GWL_RC,
                         GWL_LSTSPT_LIST(1));
          IF GWL_RC NE TDS_OK THEN
          DO;
              SEND_DONE       = SEND_DONE_ERROR;
              MSG_SRVLIB_FUNC = 'TDLSTSPT';
          END;
          DOROW: DO WRK_LSTSPT_SS = 1 TO 8;
              WRK_TRANID = GWL_LSTSPT_LIST(WRK_LSTSPT_SS);
              CALL TDSNDROW (GWL_PROC, GWL_RC);
              IF GWL_RC NE TDS_OK THEN
              DO;
                  SEND_DONE       = SEND_DONE_ERROR;
                  MSG_SRVLIB_FUNC = 'TDSNDROW';
                  LEAVE DOROW;
              END;
              CTR_ROWS = CTR_ROWS +1;
          END;
  /*------------------------------------------------------------*/
  	TDLSTSPT_EXIT:
  /*------------------------------------------------------------*/
          RETURN;
  END TDLSTSPT_PROC;

Usage


TDLSTSPT

TDLSTSPT lists the transactions for which specific tracing is enabled. Transaction-level tracing can be enabled for up to eight transactions.

See also

Related functions

Related documents