Troubleshooting
Problem
The document describes the watch function provided by QMGTOOLS.
Resolving The Problem
The QMGTOOLS provides a user friendly interface for the watch function (STRWCH, ENDWCH)
What Is It
The watch function provides a mechanism to monitor message ID, PAL or VLOG that is generated by the system and triggers a command to run. For example, if a user is running a trace to capture on a specific message ID or VLOG, then the watch function will run a command to stop the trace when that is met.
Install QMGTOOLS
http://www-01.ibm.com/support/docview.wss?uid=nas8N1011297
Usage
1) Acces the MG menu by running command GO QMGTOOLS/MG or use command QMGTOOLS/WCHSPT. The Watch Support option is in Misc Tools option (in this case option 9).

2) The Watch Support option is in option 7.

3) The command parameters are listed after the screen shot.



| Function | *START - start up the watch *STOP - stop the watch *STATUS - check the status of the watch |
| End watch when triggered | When the watch is triggered, do you want to continue running the watch? Y/N |
| Command string | This is the command string that you would like to run when the watch is triggered. For example, if a trace is running then this will be a command to stop that trace. |
| Session name | Name of the watch session |
| MSGID1 | Message ID to monitor |
| MSGID 1 search string | String to search in the MSGID |
| MSGID2 | Message ID to monitor |
| MSGID 2 search string | String to search in the MSGID |
| MSGID3 | Message ID to monitor |
| MSGID 3 search string | String to search in the MSGID |
| VLOG1 | VLOG entry to monitor |
| VLOG2 | VLOG entry to monitor |
| VLOG3 | VLOG entry to monitor |
| PAL entry 1 | PAL entry |
| PAL entry 2 | PAL entry |
| PAL entry 3 | PAL entry |
| Monitor QHST | If monitoring message ID, look in QHST? Y/N |
| Monitor QSYSOPR | If monitoring message ID, look in QSYSOPR? Y/N |
| Monitor jobs | If monitoring message ID, monitor jobs (Y/N) |
| Job1 - Job5 | If monitoring jobs, which jobs to monitor. Note: You can monitor all jobs by specifying *ALL/*ALL/*ALL for the JOB1 paramter. |
Additional Notes
- Use the Work with Watches command (WRKWCH *ALL) to view the status/details of the watch session
- When an event is triggered, something like this will appear in QSYSOPR
From . . . : DAGGITYBO 02/13/18 12:17:38
PAL entry detected
From . . . : DAGGITYBO 02/13/18 12:17:38
QMGTOOLS watch session triggered on event running command: SNDMSG MSG('PAL
entry detected') TOUSR(*SYSOPR)
Was this topic helpful?
Document Information
Modified date:
18 December 2019
UID
nas8N1020191