Differences
This shows you the differences between two versions of the page.
debug_active_job [2018/08/01 10:08] |
debug_active_job [2021/04/05 11:23] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Debug Active Job ====== | ||
+ | If you want to debug a batch job or an already active job you can do that by using '' | ||
+ | |||
+ | - Submit your program to batch. The job MUST be held. You can either hold the job queue (HLDJOBQ) or hold the individual job (HLDJOB) or specify HOLD(*YES) on the SBMJOB command. | ||
+ | - Use any of the following commands WRKSBMJOB or WRKUSRJOB or WRKACTJOB and find your submitted job. Note that the SBMJOB command gives you an informational message with the job name/ | ||
+ | - STRSRVJOB on the held batch job. | ||
+ | - STRDBG on your program. Specify UPDPROD(*YES) if needed. You'll see the source listing if you compiled with DBGVIEW(*LIST) or *SOURCE. | ||
+ | - Press F12 to exit. | ||
+ | - Release the job so that it becomes STATUS(*ACTIVE). | ||
+ | - You'll see a display asking if you want to debug or continue. Press F10 to debug. | ||
+ | - Use DSPMODSRC to see the source listing again. Now you can add your breakpoints if you want. | ||
+ | - Press F3 until you're back to the "debug or continue" | ||
+ | - The process breaks at the first break-point installed and gives you the control. | ||
+ | - When you're done, do an ENDDBG and ENDSRVJOB. | ||
+ | |||
+ | Original post: http:// | ||
+ | |||
+ | {{tag> |