How to debug a batch ILE RPG

Article

How to debug a batch ILE RPG

Thierry Schmitz

1. Compile your ILE source using DBGVIEW (*SOURCE) OPTION(*SRCSTMT:*NODEBUGIO)

2. Hold the job queue where the program will be submitted

3. Submit the job

4. Hold the submitted job

5. Release the jobq, and if required change the jobq.

6. Start servicing the submitted job using STRSRVJOB JOB(number/user/name) (Start Service job), where "number", "user' and "name" are attributes retrieved from the submitted job.

7. Start the debugger using STRDBG PGM(library/program) UPDPROD(*YES) (Start Debug)

8. You are now in the display module source. Don't try to debug or add breakpoints. It's too early. The job must be active before. Leave this screen using F12.

9. Release the held job.

10. When the job is activated, the start service job window comes. Use F10 to enter debug command.

11. Use DSPMODSRC (Display module source) command to go back to the source and add breakpoint wherever you want, using F6

12. Use F12 to resume the job, and F12 once again to go back to the start service job window.

13. Use Enter to launch the job.

14. The process breaks at the first breakpoint installed and gives you the control.

15. Debug....my friend

16. When the job is finished, you receive a 'Job being serviced ended' message.

17. Use ENDDBG command to end debug.

18. Use ENDSRVJOB to end servicing

That's

    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts including news, tips, and advice to help you do your job more efficiently and effectively. Stay informed on the hottest topics and biggest challenges faced by IT professionals working with iSeries products and services.

    By submitting your registration information to Search400.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of Search400.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

all!

Related Topics: Debugging, VIEW ALL TOPICS