Although most jobs can be debugged from another job, there are
some considerations you should follow.
- A job being debugged cannot be held or suspended (for example, when running
another group job or a secondary job).
- When servicing another job with the Start Service Job (STRSRVJOB) command,
you cannot also debug the job doing the servicing. All debug commands apply
only to the job being serviced. To debug the job doing the servicing, you
must either end the servicing of the other job, or have another job service
and debug it.
- Debug commands operate on another job, even if that job is not stopped
at a breakpoint. For example, if you are debugging a running job and you
enter the Display Program Variable (DSPPGMVAR) command,
the variable you specify is shown. Since the job continues to run, the value
of the variable may change soon after the command is entered.
- A job being debugged must have enough priority to respond to debug commands.
If you are debugging a batch job with a low priority and that job gets no
processing time, then any debug command you issue waits for a response from
the job. If the job does not respond, the command ends and an error message
is displayed.
- You cannot service and debug a job that is debugging itself. However,
you can service and debug a job that is servicing and debugging another job.