Batch jobs can be debugged by an interactive job.
To debug a batch job
The steps to debug a batch job for program ADDITION is given below:
(1) SBMJOB CMD(CALL PGM(SHARMIT1/ADDITION)) HOLD(*YES)
- Debugging batch jobs that are submitted to a job queue
Using a separate job to debug another batch job submitted to the job queue allows you to put the batch job into debug mode and to set breakpoints and traces before the job starts to process. - Debugging batch jobs that are not started from job queues
You can debug batch jobs that are started on the system but are not submitted to a job queue. These jobs cannot be stopped before they start running, but they can typically be debugged. - Debugging a job that is running
You can debug a job that is already running if you know what statements the job will run. - Debugging another interactive job
Whether a job is running or waiting at a menu or command entry display, you can debug the job from another display. - Considerations when debugging one job from another job
Although most jobs can be debugged from another job, there are some considerations you should follow.