AS/400 Batch Debugging with source

25 pts.
AS/400 debugging
Batch debugging
I want do batch debugging with source for an OPM RPG program in test enviraonment. But im not able view the source. I have compiled the program with the *SRCDBG option. But im getting a 'Source not available' message when doing batch debug. In my development machine im able to view the souce but not in test machine. Can you please tell me why this is so?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Can’t be sure exactly where you’re at but here’s 3 suggestions:

Start debug with OPMSRC(*YES)
Compile your RPG pgm with DBGVIEW(*SOURCE)
The final step in batch debugging when you don’t see the source is to use the DSPMODSRC command.

Hope this helps.

Discuss This Question: 6  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.
  • 347890
    Thanks for the suggestion. But i have done all these steps. The message 'Source not available' is displayed when i give dspmodsrc. I dont understand why :(
    25 pointsBadges:
  • Cwc
    This is likely because your source is not available in the library where the program object was compiled from. The debugger looks for the source in that same library; if it doesn't find it or doesn't find the source member, that message is displayed. Try compiling your program with OPTION(*LSTDBG) for an OPM program, or DBGVIEW(*LIST) for an ILE program or module. That will create the program object with the source view attached to it, so that you can debug the program no matter where it is -- the debugger won't have to find the source because it will be part of the object.
    4,290 pointsBadges:
  • 347890
    Sorry for replying late. I was not well for some days because of which i couldnt try out what you have suggested. I tried compiling the program with the *LSTDBG option but its still not working. Its displaying the same message 'Souce not available'.
    25 pointsBadges:
  • bvining
    Due to the large number of possible variables please provide the exact commands (including, if you are using default library values such as *LIBL or *CURLIB, what library is effectively being used on each command) when you: 1. Create the *PGM on your development system 2. Save, send, and restore the *PGM from the development system to your test system 3. How you start service for the batch job on the test system 4. How the batch job calls the *PGM you are attempting to debug From your last note it certainly sounds like the program you are running in your test environment is not the program you compiled on the development system. By analyzing the above steps we should be able to determine why.
    7,070 pointsBadges:
  • RLPBlum
    You can view the source on the development machine but not in the test machine... Does your source exist on the Test machine?? If not, then that is the problem... We keep the source on our test when we need to debug on the development machine...We have to do a save file on the Source Library and then send and restore on the development machine..
    10 pointsBadges:
    This problem should surely be olved if you give the *LSTDBG option and compile your program. this will enable you to see the source for an OPM program.
    85 pointsBadges:

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.


Share this item with your network: