News Stay informed about the latest enterprise technology news and product updates.

How to debug a batch ILE RPG

Here is an easy way to debug a batch ILE RPG.

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 all!

Dig Deeper on Debugging

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

  • How do I size a UPS unit?

    Your data center UPS sizing needs are dependent on a variety of factors. Develop configurations and determine the estimated UPS ...

  • How to enhance FTP server security

    If you still use FTP servers in your organization, use IP address whitelists, login restrictions and data encryption -- and just ...

  • 3 ways to approach cloud bursting

    With different cloud bursting techniques and tools from Amazon, Zerto, VMware and Oracle, admins can bolster cloud connections ...

Close