Why a program works in debug mode, but doesn’t work at run time?

0 pts.
Tags:
RPG
I modified program(A) that calls another program(B)to generate a spool file. When I debug (STRDBG)program(A) and break right before the call, it works. But when I got out and end the debug mode and try to run that same program(A), no spool was generated. Then, I bebug only the called program(B)and call program(A). It breaks at program(B) and a spool file was generated, so I know the call in program(A) works. However it doesn't work outside of debug mode. These programs are in ILE and I'm on V5R3.
ASKED: June 16, 2005  1:54 PM
UPDATED: October 26, 2009  6:34 AM

Answer Wiki

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

While you are in debug check your library list. Make sure there are no ‘other’ versions of your programs in other libraries and make sure your files are all coming from where they should. Then do the same when you end debug.

Discuss This Question: 3  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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • AskDave
    I don't know if the 2nd program displays a screen of any kind (or if the 1st pgm does for that matter). But I've experienced something similar when I forgot to use RSTDSP(*YES) on screen-1 and pgm 2 displays a window. Also, check your job for error messages (both ways) to see if that generates a clue to your problem. Dave
    0 pointsBadges:
    report
  • Openanewdoor
    That's a wild question... As you know, in programming--Muphy's law takes place. It could be while in debug you a setting up parameters manually...or the libray list could be an issue...or maybe security. Hopfully you found your problem by time you see this message.
    0 pointsBadges:
    report
  • TomLiotta
    There are numerous reasons a program might be successful in debug and fail otherwise. Consider the various commands and APIs that have kinds of WAIT() parameters. In debug, it can take a long time to go from one step to another -- a WAIT() timer might have plenty of time to fire. Or a database index build might have time in an intermediate step. Or...? Insert some simple messaging code at a few logical points to verify that those points get control in a standard environment. Don't use debug until you've narrowed things down to know what you want to look at rather than simply to go through entire programs. Tom
    125,585 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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following