TDINFACT

Description

Retrieves information about Gateway-Library accounting.

Syntax

%INCLUDE SYGWPLI;
01 IHANDLE              PTR,
01 RETCODE              FIXED BIN(31),
01 ACCOUNTING_FLAG      FIXED BIN(31),
01 ACCOUNTING_FILENAME  CHAR(08),
01 MAXNUM_TRACE_RECORDS FIXED BIN(31);
CALL TDINFACT  (IHANDLE, RETCODE, ACCOUNTING_FLAG,
                ACCOUNTING_FILENAME,
                 MAXNUM_ACCT_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 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-12.

ACCOUNTING_FLAG

(O) Accounting on/off indicator. This argument returns one of the following values:

TDS_TRUE (1)

Accounting is on.

TDS_FALSE (0)

Accounting is off.

ACCOUNTING_FILENAME

(O) Variable where the name of the accounting log is returned.

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

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

MAXNUM_ACCT_RECORDS

(O) Accounting log record limit.

Under CICS: This is the maximum number of records to be allocated for this accounting file. A value of -1 indicates the system maximum.

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

Under MVS: Use -1. The size of the log is determined by the space allocated to the sequential file used as the MVS log.

Returns

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

Table 3-12: TDINFACT 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 processes a request for accounting information and returns that information to the client. This example is based on the sample program in Appendix G, “Sample Tracing and Accounting Program”, which runs under CICS.

 	/*------------------------------------------------------------------*/ 
	TDINFACT_PROC: PROC; 
  	/*------------------------------------------------------------------*/ 
          WRKLEN1         = STG(GWL_INFACT_STATUS); 
          WRKLEN2         = STG(CN_INFACT_STATUS); 
          CTR_COLUMN      = CTR_COLUMN +1; 
          MSG_SRVLIB_FUNC = 'TDESCRIB'; 
          CALL TDESCRIB (GWL_PROC, GWL_RC, CTR_COLUMN, TDSINT4, 
                         WRKLEN1, GWL_INFACT_STATUS, TDS_ZERO, 
                         TDS_FALSE, TDSINT4, WRKLEN1, 
                         CN_INFACT_STATUS, WRKLEN2); 
          IF GWL_RC NE TDS_OK THEN 
          DO; 
              SEND_DONE = SEND_DONE_ERROR; 
              GO TO TDINFACT_EXIT; 
          END; 
          WRKLEN1    = STG(GWL_INFACT_FILENAME); 
          WRKLEN2    = STG(CN_INFACT_FILENAME); 
          CTR_COLUMN = CTR_COLUMN +1; 
          CALL TDESCRIB (GWL_PROC, GWL_RC, CTR_COLUMN, TDSCHAR, 
                         WRKLEN1, GWL_INFACT_FILENAME, TDS_ZERO, 
                         TDS_FALSE, TDSCHAR, WRKLEN1, 
                         CN_INFACT_FILENAME, WRKLEN2); 
          IF GWL_RC NE TDS_OK THEN 
          DO; 
              SEND_DONE = SEND_DONE_ERROR; 
              GO TO TDINFACT_EXIT; 
          END; 
          WRKLEN1    = STG(GWL_INFACT_RECORDS); 
          WRKLEN2    = STG(CN_INFACT_RECORDS); 
          CTR_COLUMN = CTR_COLUMN +1; 
          CALL TDESCRIB (GWL_PROC, GWL_RC, CTR_COLUMN, TDSINT4, 
                         WRKLEN1, GWL_INFACT_RECORDS, TDS_ZERO, 
                         TDS_FALSE, TDSINT4, WRKLEN1, 
                         CN_INFACT_RECORDS, WRKLEN2); 
          IF GWL_RC NE TDS_OK THEN 
          DO; 
              SEND_DONE = SEND_DONE_ERROR; 
              GO TO TDINFACT_EXIT; 
          END; 
          CALL TDINFACT (GWL_INIT_HANDLE, GWL_RC, GWL_INFACT_STATUS, 
                         GWL_INFACT_FILENAME, GWL_INFACT_RECORDS); 
          IF GWL_RC NE TDS_OK THEN 
          DO; 
              SEND_DONE       = SEND_DONE_ERROR; 
              MSG_SRVLIB_FUNC = 'TDINFACT'; 
              GO TO TDINFACT_EXIT; 
          END; 
          CALL TDSNDROW (GWL_PROC, GWL_RC);
	/*------------------------------------------------------------------*/ 
	TDINFACT_EXIT: 
  	/*------------------------------------------------------------------*/ 
          	RETURN; 
	END TDINFACT_PROC;

Usage


TDINFACT

You use this function to determine whether system-wide accounting recording is on or off and, under CICS, to learn the name of the accounting log.

See also

Related functions

Related documents