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.
Software/Hardware used:
ASKED:
June 16, 2005 1:54 PM
UPDATED:
October 26, 2009 6:34 AM
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
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.
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