CL Command Reference - ENDTRC
CL Command List > ENDTRC Reference
Description:
The End Trace (ENDTRC) command ends a trace session that was started by a STRTRC (Start Trace) command.
Restrictions:
. To use this command, you must have service (*SERVICE) special authority, or be authorized to the Service trace function of Operating System through iSeries Navigator¡¯s Application Administration support. The Change Function Usage (CHGFCNUSG) command, with a function ID of QIBM_SERVICE_TRACE, can also be used to change the list of users that are allowed to perform trace operations.
. If DTAOPT(*LIB) is specified, you must have authority to the library and the database files within that library where the trace data is stored.
. If PRTTRC(*YES) is specified, you must have authority to the PRTTRC (Print Trace) command.
Examples:
Example 1: End Most Recently Started Trace
ENDTRC SSNID(*PRV)
This command ends the trace session started most recently by the same user who is running the ENDTRC command. The trace data will be stored in a set of files in the current library of the job, or QGPL if there is no current library for the job.
Example 2: End a Trace and Delete Trace Data
ENDTRC SSNID(DCG1) DTAOPT(*DLT)
This command ends the trace session DCG1 and deletes the trace data.