You can specify exit programs in the trace program parameter to extend the capability of the watch function.
Click these links to learn how you can implement exit programs.
Example: Watch exit program This is sample code for a watch trace exit program. It is written in control language (CL).
Example: Modifying the exit program Using the example exit program as a starting point, you can modify the code to allow the program to perform additional function.