Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The End Trace (ENDTRC) command ends a trace session that was started by a STRTRC (Start Trace) command.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
SSNID | Session ID | Name, *PRV | Required, Positional 1 |
DTAOPT | Data option | *LIB, *DLT | Optional |
DTALIB | Data library | Name, *CURLIB | Optional |
RPLDTA | Replace data | *YES, *NO | Optional |
PRTTRC | Print trace data | *NO, *YES | Optional |
Top |
Specifies a session identifier for the trace to be ended. This name must match the session identifier of a trace that had been previously started and is still active.
This is a required parameter.
Top |
Specifies whether the trace data that has been collected is stored into database files or if the trace data is deleted.
Top |
Specifies the name of the library in which the trace data will be stored. A set of database files will be created in this library to contain the trace data. The files will be created if they do not already exist.
Note: This parameter is valid only if *LIB is specified for the Data option (DTAOPT) parameter.
Top |
Specifies whether trace data that was collected by a previous trace session with the same session identifier is replaced with new trace data. This is determined by checking if the set of database files where the trace data is to be stored already have file members with the same name as the specified trace session identifier (SSNID parameter).
Note: This parameter is valid only if *LIB is specified for the Data option (DTAOPT) parameter.
Top |
Specifies whether trace data is formatted and printed after it is stored in the trace database files.
Note: This parameter is valid only if *LIB is specified for the Data option (DTAOPT) parameter.
Top |
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.
Top |
*ESCAPE Messages
Top |