AS/400 CLLE: How to debug batch jobs

450 pts.
Tags:
AS 400
CLLE
There is a program A which calls another program B and submits the job, here how to debug the program? In simple terms how to debug batch jobs?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 8  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TheRealRaven
    Use RDi, or one of the other graphical debuggers, to set a service entry point (SEP) for the program to debug before submitting the job. If the job is submitted through a *JOBQ that is held, the SEP can be set while the job is waiting to run.

    SEPs can be set and used through green-screen interfaces, but it's harder to learn the procedures.
    36,320 pointsBadges:
    report
  • Jpjawili
    When using plain old green screen, STRDBG then SBREAK nnnn where nnnn is the line number. Make sure the profile you use to add the sbreak and the profile you used to call the program are the same. hope this helps. 
    325 pointsBadges:
    report
  • GregManzo
    And also use STRSRVJOB to nominate which job to debug, otherwise you will only be debugging your interactive session.
    2,970 pointsBadges:
    report
  • vivekntt21
    If a call submits another job (inside call) how to debug that CL program?
    450 pointsBadges:
    report
  • GregManzo
    That submitted job is a completely independent job - you will need to STRSRVJOB on it, then STRDBG and add your breakpoints. Note that any given interactive session can only be servicing one batch job at a time, so if you need to be debugging both jobs you'll need two sessions.
    2,970 pointsBadges:
    report
  • Jpjawili
    +1 on Greg. Also, SBREAK debug command is handy during debugging:

    https://www.ibm.com/support/knowledgecenter/en/ssw_i5_54/rbam6/dbpgm.htm


    SBREAKPermits you to enter a service entry point at a position in the program being tested. A service entry point is a type of breakpoint established in a program to facilitate the system debugger in gaining control of a spawned job. The breakpoint is only signaled when the job within which the service entry point was hit is not currently under debug.
    325 pointsBadges:
    report
  • mmanley
    I have used the IBM System Debug Manager for a long time.  It's a Java program, and will let you set breakpoints, examine variables, etc. in a graphical environment.  You can probably find it by searching the IBM site.  It's very intuitive, and easy to use.  In order to see the code as you debug, you'll need to compile the program with *SOURCE view.  Here's a link to the IBM page, but I think you need to be a registered IBM user to get the content...  https://www.ibm.com/developerworks/ibmi/library/i-debug/index.html
    470 pointsBadges:
    report
  • TheRealRaven
    The Java System Debugger is very handy. I used to use it when running Windows yeasrs ago, and I use it the same now with Linux. I've never understood why it's not used by more developers.
    36,320 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: