ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

active job debug

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • active job debug

    Hi,

    I have batch job running on system. i need to debug it .

    steps to do that . may be it is repeated , i apologize
    The Secret Of Achieving Your Goals Is Revealed Before Your Eyes.
    System Engineer

    Sudha...

  • #2
    Re: active job debug

    In RDI under remote systems - jobs - active jobs find your job - right click - debug as ibm i job

    Comment


    • #3
      Re: active job debug

      If it's running, and don't have RDi - using wrkactjob or wrkusrjob find the job, display the job....

      strsrvjob jobnbr/user/jobname
      strdbg ....

      the strsrvjob tells debug that it is to operate on that job.

      Comment


      • #4
        Re: active job debug
        1. If batch job is already running, go to step 2. Submit job with HOLD(*YES) or Hold the JOBQ w/HLDJOBQ, submit new job, hold new job w/WRKJOBQ, release JOBQ w/RLSJOBQ. And is a good idea to to ALWAYS code HOLD(&HOLD) on SBMJOB command in CL where &HOLD is 5a *NO. You can simply change this to *YES in debug.
        2. STRSRVJOB JobNum/JobUser/JobName
        3. STRDBG PGMNAME (you can see source code but can't add any breakpoints yet). Hit F12.
        4. Release the job from hold and you'll get an info screen about "Serviced job released from job queue".
        5. Press F10 to enter debug commands.
        6. DSPMODSRC and add break points.
        7. Hit F12 back to the "Start Serviced Job" screen.
        8. Hit ENTER to start debugging.
        9. When all done, ENDDBG, ENDSRVJOB.


        Chris Ringer

        Comment


        • #5
          If the job is already running, using WRKACTJOB first we need to hold the job. (or) If the job is not running then while submitting include this parameter
          SBMJOB CALL (PGMA) HLD (*YES)

          b. Note the Job Number, Job Name & User.(*Unique parameter for any job)

          c. Issue STRSRVJOB with the Job Number, Job Name & User.

          d. STRDBG

          e. Release the job.

          f. Start Debugging.

          g. ENDDBG

          h. ENDSRVJOB

          Young people knows how to run fast but old people knows the way..

          Comment

          Working...
          X