Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
We have a lot of programs that were written way back when dinosaurs roamed the earth. At that time the preferred method for reading a subset in a file was to OVRDBF file SHARE(*YES), OPNQRYF file SELECT('some records'), CALL rpgpgm. The RPG program would process the selected records found in the shared open datapath opened by the OPNQRYF.
As of today (for us V7.1) this appears to be broken. I can only assume it was caused by a recent PTF - and unfortunately our Admin is away for the rest of this week, so we don't currently know what he installed last weekend.
Anyone else encountering this problem?
and yes I know I could rewrite this using SQL, but there's a lot of 20+ yo programs that are using this technique.
I think I've seen this when the RPG program is running in a *NEW or NAMED activation group and the CL is CLP. When I changed the CLP attribute to CLLE and recompiled it seemed to fix it.
Bob is probably in the right vein. Called RPG in a different activation group than the calling CL? Another option is to change OVRDBF and DLTOVR to use override scope of *JOB. Not always appropriate, but for older code shouldn't cause much of a problem, especially if all you changed is to compile as ILE.
I thought about that but all these programs are OPM and not compiled since 2005 or earlier.
We tried OVRSCOPE and OPNSCOPE, no effect with either of these. The program was working last week, and suddenly stopped today (maybe yesterday) sometimes it can take users a while to figure out something is broken.
I would first look at the objects in the jobstream and verify that they have not been recompiled recently. Then to fix the problem, I'd try changing to CLLE.
The IBM team involved in CL nowadays is someone missing the historical experience and knowledge of this system. Its the first time ever that I've had bugs in CL and commands since the system was announced. Of course they haven't really enhanced CL much except for that short bubble in the last decade.
Just tried the CLLE thing before you mentioned it, no joy. Think I'll call it a day and hit this with a fresh mind in the morning.
ok, we checked some other programs this morning that perform a share override and then OPNQRYF and the RPG is working as expected. It seems our issue is one single file, that someone was copying about 15million records into. Any chance that we could have blown something up in DB2?
Tests so far include:
Must admit this has me stumped.