CL Command Reference - STRCMNTRC
CL Command List > STRCMNTRC Reference
Description:
The Start Communications Trace (STRCMNTRC) command initiates a communications trace for a specified line, a network interface or a network server description.
A communications trace continues until:
. The End Communications Trace (ENDCMNTRC) command is run.
. The Communications Trace function of the Start System Service Tools (STRSST) command is used to end the trace.
. A physical line problem causes the trace to end.
. TRCFULL(*STOPTRC) is specified and the buffer becomes full.
. Automatically by the watch for trace event functionality.
Restrictions:
. The user must have *USE authority to the line, network interface, or network server to be traced.
. 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.
. The following user profiles have authority to this command:
¨C QSECOFR
¨C QSRV
. When the Watched job (WCHJOB) parameter is specified, the issuer of the command must be running under a user profile which is the same as the job user identity of the job being watched, or the issuer of the command must be running under a user profile which has job control (*JOBCTL) special authority. Job control (*JOBCTL) special authority is also required if a generic user name is specified for the WCHJOB parameter.
. If you specify a generic user name in the WCHJOB parameter, you must have all object (*ALLOBJ) special authority, or be authorized to the Watch Any Job function of Operating System through iSeries Navigator¡¯s Application Administration support. The Change Function Usage (CHGFCNUSG) command, with a function ID of QIBM_WATCH_ANY_JOB, can also be used to change the list of users that are allowed to start and end watch operations.
. You must have operational (*OBJOPR) and execute (*EXECUTE) authorities to the user exit program if specified in Trace program (TRCPGM) parameter, and execute (*EXECUTE) authority to the library where the program is located.
. You must have use (*USE) authority to the message queues specified in Watched message queue (WCHMSGQ) parameter, and use (*USE) authority to the library where the message queue is located.
Examples:
Example 1: Start a Communications Trace for a Line Description
STRCMNTRC CFGOBJ(*QESLINE) CFGTYPE(*LIN)
This command starts a communications trace of line description QESLINE.
Example 2: Start a Trace and Watch for a Message to End the Trace
STRCMNTRC CFGOBJ(LINE001) CFGTYPE(*LIN) WCHMSG((MCH2804))
WCHMSGQ((*SYSOPR) (*JOBLOG)) WCHJOB((*ALL/MYUSER/MYJOBNAME))
TRCPGM(MYLIB/TRCEXTPGM)
This command starts a communications trace of line description LINE001. The trace will be ended when MCH2804 message is found on the System Operator message queue or within the *ALL/MYUSER/MYJOBNAME job log. Also, MYLIB/TRCEXTPGM is specified as a trace exit program.
Example 3: Start a Trace and Watch for a LIC Log Entry to End the Trace
STRCMNTRC CFGOBJ(LINE001) CFGTYPE(*LIN)
WCHLICLOG((¡¯99??¡¯ 9932 MYJOBNAME)) WCHTIMO(*NOMAX)
This command starts a communications trace of line description LINE001. The trace will be ended when a Licensed Internal Code (LIC) log entry that has a major code starting with 99 and a minor code of 9932 is generated on the system. Also, the LIC log information should contain the text ¡åMYJOBNAME¡å. *NOMAX on WCHTIMO parameter indicates that the trace will be active until the event occurs or ENDCMNTRC command is issued manually.