CL Command Reference - TRCCPIC

CL Command List > TRCCPIC Reference

Description:

The Trace Common Programming Interface Communications (TRCCPIC) command controls tracing of all CPI Communications that occur in the job in which the command is entered. The command sets a trace on or off, and traces (1) CPI Communications calls issued by a program and (2) data that is sent and received.

As trace records are collected, they are stored in an internal trace storage area. When the trace is ended, the trace records can be directed to a spooled output file or a database physical file.

If the Start Service Job (STRSRVJOB) command is entered before the TRCCPIC command, the job that is traced is the one specified on the STRSRVJOB command. The trace output from the serviced job is returned to the servicing job after the trace is set off or after the serviced job has ended.

Restrictions:

(1) The record format of the database output file must match the record format of the IBM-supplied output file, QACM0TRC.

(2) The user must have specific authority from the security officer to use this command.


Examples:

Example 1: Starting Trace Operation

TRCCPIC MAXSTG(350) DTALEN(256)

This command traces the CPI Communications calls of the current job. The trace file contains 350KB of storage and wraps to the beginning if that amount of storage is filled with trace records. In addition, this command traces up to 256 bytes of user data on each input/output operation.



Example 2: Stopping Trace Operation

TRCCPIC SET(*OFF) OUTPUT(*OUTFILE) OUTFILE(TRACELIB/CPICTRACE) OUTMBR(TRACEMBR)

This command stops the trace and directs the output to the database file CPICTRACE in library TRACELIB. The output is directed to the member TRACEMBR.