IBM Support

Debugging Batch Programs with STRISDB

Troubleshooting


Problem

This document outlines the procedure for debugging OPM programs submitted for batch execution using the Interactive Source Debugger (STRISDB).

Resolving The Problem

This document outlines the procedure for debugging OPM programs submitted for batch execution using the Interactive Source Debugger (STRISDB). To debug a program using STRISDB in batch, you should do the following:
1. Make sure the program is compiled with debug information (in other words, CRTRPGPGM OPTION(*SRCDBG).
2. Submit the job with the program that you wish to debug using SBMJOB.
3. Run STRSRVJOB against the job that you submitted.
4. Run STRISDB UPDPROD(*YES) INVPGM(*NO) against the program you wish to debug.
Note: The interactive source debugger cannot be used to debug a service job that is held. If you attempt to run STRISDB while the serviced job is held, you will receive the following errors:

IXA0048 - Error occurred setting the first breakpoint.
CPF1938 - Command is not allowed while serviced job is not active.
CPF1999 - Errors occurred on command.

To circumvent this problem, you should write a small CL program to delay the job for a few seconds (using DLYJOB) and then call the main program. This will allow time to run STRSRVJOB and STRISDB before the main program gets executed.

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m3p000000F91QAAS","label":"Programming ILE Languages-\u003EDebugger"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]

Historical Number

635926314

Document Information

More support for:
IBM i

Component:
Programming ILE Languages->Debugger

Software version:
All Versions

Operating system(s):
IBM i

Document number:
684385

Modified date:
06 December 2024

UID

nas8N1010938

Manage My Notification Subscriptions