Appendix G: Sample Tracing and Accounting Program

This appendix contains a sample mainframe server application program that a system programmer can use to perform mainframe-based tracing and accounting functions.

NoteThis program is not included with Open ServerConnect.

The purpose of this sample program is to demonstrate the use of all Gateway-Library tracing and accounting functions. In some cases, one Gateway-Library function is used for demonstration purposes when another function would be more efficient. In order to best illustrate the flow of processing, the program does not do extensive error checking.

This sample program uses VS COBOL II and Gateway-Library and runs under CICS.

This program demonstrates the use of the following Gateway-Library functions listed in Table G-1.

Table G-1: Functions used in SYCCSAS2

Name

Action

TDACCEPT

Accept a client request.

TDESCRIB

Describe a column.

TDFREE

Free up the TDPROC structure for the connection.

TDINFACT

Get current accounting information.

TDINFLOG

Get current trace settings for trace log.

TDINFSPT

Get specific tracing information.

TDINIT

Initialize the Gateway-Library environment.

TDLSTSPT

Get list of active specific trace transaction IDs.

TDRCVPRM

Receive RPC parameter from client program.

TDRESULT

Describe next communication from client.

TDSETACT

Set accounting on or off.

TDSETLOG

Set trace log on or off.

TDSETSPT

Set tracing on or off for a specific transaction.

TDSNDDON

Send results-completion to client.

TDSNDMSG

Send message to client.

TDSNDROW

Send row to client.

TDSTATUS

Get status information.

TWRTLOG

Write a user record to the trace log.