Home > AS/400 News > How to debug a batch ILE RPG
AS/400 News:
EMAIL THIS LICENSING & REPRINTS

How to debug a batch ILE RPG

By Thierry Schmitz
01 Jun 2004 | Search400.com

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   

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!



Tags: DebuggingVIEW ALL TAGS

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 1999 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts