Sponsored Links
Sponsored Link

sponsored links

Collapse

Announcement

Collapse
No announcement yet.

Assistance with running a job in debug.

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

  • Assistance with running a job in debug.

    Hello,


    I'm a little stuck and looking for advice here.

    I am trying to run a program in debug via STRSRVJOB and STRDBG. I have done this before, for jobs that are constantly running and it works fine, so I thought it would be simple enough to apply the same process to jobs that are submitted to a queue, run for a bit and then end - however I am struggling to get it to work...


    I have tried following this; https://www.ibm.com/support/knowledg...debugbatch.htm


    So I do STRSRVJOB, that's fine.
    I then do STRDBG on my program with update production files *YES
    The source appears, now usually here I would press F10, the source would disappear and when the program is called it would break
    However in this instance it doesn't, it says that F10 is an invalid action as the program isn't active - it seems the only options I have are F3 or F12...
    So I pressed F12
    I release the job the and get a prompt, I press F10 to add debug commands.
    If I try ADDBKP for statement 1 of my program, it says the program isn't active in an OPM environment...
    If I go back to the prompt and press enter, the program just ends without breaking...

    Can anyone advise how to get my program to break? The job finishes in about 5 seconds so there's no time for me to ninja in a STRDBG when it starts.


    Thanks,
    Ryan

  • #2
    Don't just press F10 (which means to step to the next statement) instead, add a breakpoint. I forget which F-key it is in the old green-screen tools... either F6 or F8, I'm sure. It'll say at the bottom of the screen.

    Comment


    • #3
      Hi Scott,

      Thanks for the reply, I usually just do F10 so it breaks on the first line - I tried F6 but it didn't work, same error;

      CPF1938 - "Command is not allowed while serviced job is not active."



      However, you have helped here; when copying the message ID, to try and give as much info as I could, I thought I'd google it and I found this post.


      DSPMODSRC was what I was after, so when I get the prompt "Press F10 to enter debug commands or Enter to resume job" I did F10 then DSPMODSRC and this bought up the source- I could then use F6 to add a break point

      Cheers,
      Ryan

      Comment

      sponsored links

      Collapse

      Working...
      X