TDINFLOG

Description

Determines what types of mainframe server tracing are set.

Syntax

%INCLUDE SYGWPLI;
01 IHANDLE               PTR,
01 RETCODE               FIXED BIN(31),
01 GLOBAL_TRACE_FLAG     FIXED BIN(31),
01 API_TRACE_FLAG        FIXED BIN(31),
01 TDS_HEADER_TRACE_FLAG FIXED BIN(31),
01 TDS_DATA_TRACE_FLAG   FIXED BIN(31),
01 TRACE_ID              FIXED BIN(31),
01 TRACE_FILENAME        CHAR(08),
01 MAXNUM_TRACE_RECORDS  FIXED BIN(31); 
CALL TDINFLOG (IHANDLE, RETCODE, GLOBAL_TRACE_FLAG
	 API_TRACE_FLAG, TDS_HEADER_TRACE_FLAG,
	 TDS_DATA_TRACE_FLAG, TRACE_ID,
	 TRACE_FILENAME, MAXNUM_TRACE_RECORDS);

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 TDINIT call. It corresponds to the context structure in Client-Library.

RETCODE

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

GLOBAL_TRACE_FLAG

(O) Global/specific trace indicator. This argument indicates whether tracing is on or off, and whether it is global (traces all transactions) or applies to a specific set of transactions. If tracing is set off, only errors are logged.

The GLOBAL_TRACE_FLAG argument returns one of the following values:

TDS_NO_TRACING (0)

All tracing is off.

TDS_TRACE_ALL_RPCS (1)

Global tracing is on.

TDS_TRACE_SPECIFIC_RPCS (2)

Specific tracing is on.

TDS_TRACE_ERRORS_ONLY (3)

Only errors are logged.

API_TRACE_FLAG

(O) API tracing on/off indicator. This is a Boolean value that indicates whether tracing is turned on or off for Gateway-Library calls. This argument returns one of the following values:

TDS_TRUE (1)

API tracing is on.

TDS_FALSE (0)

API tracing is off.

TDS_HEADER_TRACE_FLAG

(O) TDS header tracing on/off indicator. This is a Boolean value that indicates whether tracing is turned on or off for TDS headers. This argument returns one of the following values:

TDS_TRUE (1)

Header tracing is on.

TDS_FALSE (0)

Header tracing is off.

TDS_DATA_TRACE_FLAG

(O) TDS data tracing on/off indicator. This is a Boolean value that indicates whether tracing is turned on or off for TDS data. This argument returns one of the following values:

TDS_TRUE (1)

Data tracing is on.

TDS_FALSE (0)

Data tracing is off.

TRACE_ID

(O) The trace entry identifier.

Under CICS: This is the tag for the auxiliary file entry.

Under IMS TM and MVS: Leave this field blank. This argument is ignored.

TRACE_FILENAME

(O) Name of the trace/error log.

Under CICS: This is the DATASET name from the CICS File Control Table (FCT) entry that describes the VSAM file used for this log. As installed, this name is SYTDLOG1.

Under IMS TM and MVS: Leave this field blank. IMS TM and MVS ignore this value.

MAXNUM_TRACE_RECORDS

(O) Trace log record limit.

Under CICS: This is the maximum number of records that can be written to this file. A value of -1 indicates the system maximum.

Under IMS TM: The IMS TM system log does not have a limit.

Under MVS: The limit is the amount of space on the log file.

Returns

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

Table 3-14: TDINFLOG 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.

TDS_LOG_ERROR(-258)

Attempt to write to the log file failed.

Examples

Example 1

The following code fragment uses TDINFLOG to determine the tracing status at the beginning of an application. This example is taken from the sample program in Appendix C, “Sample Language Application for CICS.”

 	/*     -------------------------------------------------------------*/
  	/*      Establish gateway environment                               */
  	/*      ------------------------------------------------------------*/
          CALL TDINIT (DFHEIBLK, GWL_RC, GWL_INIT_HANDLE);
  	/*      ------------------------------------------------------------*/
  	/*      turn on local tracing if not on globally or locally         */
	/*      ------------------------------------------------------------*/
          CALL TDINFLOG (GWL_INIT_HANDLE, GWL_RC,
                         GWL_INFLOG_GLOBAL,
                         GWL_INFLOG_API,
                         GWL_INFLOG_TDS_HEADER,
                         GWL_INFLOG_TDS_DATA,
                         GWL_INFLOG_TRACE_ID,
                         GWL_INFLOG_FILENAME,
                         GWL_INFLOG_TOTAL_RECS);
          IF GWL_INFLOG_GLOBAL ^= TDS_TRACE_ALL_RPCS &
             GWL_INFLOG_GLOBAL ^= TDS_TRACE_SPECIFIC_RPCS THEN
          DO;
              TRACING_SET_SW = TRACING_SET;
              CALL LOCAL_TRACING;
          END;
  /*      ------------------------------------------------------------*/
  /*      Accept client request                                       */
  /*      ------------------------------------------------------------*/
          CALL TDACCEPT (GWL_PROC, GWL_RC, GWL_INIT_HANDLE,
                         SNA_CONNECTION_NAME,
                         SNA_SUBC);

Usage


TDINFPGM

This function is used to determine whether tracing is turned on, and whether the traces are global or for specific transactions only. The following kinds of tracing are supported:

See also

Related functions

Related Documents