I have an RPGLE program that works when run in debug mode but will not update the file when run outside of debug.
I have looked at the obvious, such as library list to ensure using same versions of programs.
At a loss......
Software/Hardware used:
ASKED:
January 9, 2007 10:57 AM
UPDATED:
December 29, 2009 4:48 PM
Check your joblog for any errors that might have presented themselves. What release level is your i5 at?
I have had this problem before and it was related to the fact that I was running the debug interactively, but the regular run of the program was run in batch. The problem was traced back to the way that parameters are passed on a sbmjob. This may be your problem, especially if you are passing in numeric parameters.
Is this an SQL RPG program? Reason I am asking is we have run into problems where a program was not created with COMMIT(*NONE) so it is assuming the program is being called under commitment control. Nothing was being written or updated in the program until we recreated it.
I agree with previous answer. Happened to me once. I was running debug interactive. While alone it was run in batch.
I’d look at my library list in each situtation.
Jack
Is the file journaled? If so, check the journal entries to see what was updated after you run the program outside of debug.
To further clarfiy some of the other answers posted – is this a batch job. If so, check the library list of the batch job. This should be in the job description. Also, look into the begining of the job log to see what library list it really used to run the job.
If the job is using a different library list and you are making updates thru a logical file, the LF might be pointing to an entirely different PF, but you are querying the file what you believe is right.
Another thing that I have come across is expecting new records at end of file, but the record was inserted elsewhere due to key sequence.
In debug you specify to update live files. Running live you have to be authorized to update the file in production. If not a library issue it could be an authorization issue, Run th job in batch and specify a log to print. This will tell you what is happening in batch.