Work with Watches (WRKWCH)

The Work with Watches (WRKWCH) command can be used to show a panel with the list of active watches around the system. An active watch can be a watch started issuing Trace Internal (TRCINT), Start Trace (STRTRC), Trace Connection (TRCCNN), Trace TCP/IP Application (TRCTCPAPP), and Start Communications Trace (STRCMNTRC) commands specifying watches parameters, or a session started using Start Watch (STRWCH) command, or using Start Watch (QSCSWCH) API.

When you run this command, the Work with Watches panel is shown. From this display you can end an active watch or start a new one. Also the watches being ended are shown.

Restrictions:

Parameters

Keyword Description Choices Notes
WCH Watch Single values: *ALL
Other values (up to 3 repetitions): *SRVMON, *STRWCH, *TRCCMD
Required, Positional 1

Watch (WCH)

Specifies the watches to be shown on the Work with Watches panel.

This is a required parameter.

Single values

*ALL
All active watches are shown in the Work with Watches panel.

Other values

*SRVMON
Active watches started using the Service Monitor function of the operating system are shown.
*STRWCH
Active watches started using the Start Watch (STRWCH) command or the Start Watch (QSCSWCH) API are shown.
*TRCCMD
Active watches started using Start Communications Trace (STRCMNTRC), Start Trace (STRTRC), Trace Internal (TRCINT), Trace Connection (TRCCNN) and Trace TCP/IP Application (TRTCPAPP) commands are shown.

Examples

WRKWCH   WCH(*TRCCMD)

This command displays the Work with Watches panel, showing all watch sessions started via watches parameters specified in Trace Internal (TRCINT), Trace Connection (TRCCNN), Start Communications Trace (STRCMNTRC), Trace TCP/IP Application (TRCTCPAPP) and Start Trace (STRTRC) commands.

Error messages

*ESCAPE Messages

CPF39E6
The user does not have the required authority.
CPF98A2
Not authorized to &1 command or API.