Tom,
I am forwarding your questions to our developer to see if they can provide some answers. I will respond as soon as I have some information.
Thank you!
Main Topics
Browse All TopicsWe have an issue on our development i5 system concerning library lists. We have production libraries on our dev system (that is, dev copies of corresponding production libraries). For this question the (dev) production program library (program files) is EXMP, and the data library (physical files) is EXMD.
One of our developers has a work library called EXM4543 in which they have both program source, actual compiled program file, and corresponding data files. The structure of the data files have changed, with corresponding source code changes to the program to handle the new data file structure.
Here is the potential library cache problem:
* The library list contains EXMP and EXMD (the dev production library copies)
* The program is run and everything works ok as the normal programs are running against the normal data files
* The developer ADDS library EXM4543 to the top of their library list with "ADDLIBLE EXM4543"
* The developer then immediately runs the same program, which should run the EXM4543 program against the EXM4543 data files
* What happens is that the program gets a level check error. The error complains about the program trying to open the EXM4543 data files.
* If the developer cancels the error and simply runs the program again is runs just fine.
* The developer then REMOVES library EXM4543 from their library list with "RMVLIBLE EXM4543"
* The developer then again immediately runs the same program, which should run the normal program against the normal data files
* What then happens is that the program gets a level check error again. The error complains about the program trying to open the normal data files.
* If the developer cancels the error and simply runs the program again is runs just fine.
Now....the developer logs out and starts from scratch....this time with one difference
* The developer ADDS library EXM4543 to the top of their library list with "ADDLIBLE EXM4543"
* The developers PRESSES F5 TO REFRESH
* The developer then immediately runs the same program, which SUCCESSFULLY runs the EXM4543 program against the EXM4543 data files
To me it appears that:
When the developer adds the development library and immediately runs the program:
* The system finds the development library data files just fine but somehow still runs the normal program
When the developer removes the development library and immediately runs the program:
* The system finds the normal data files just fine but somehow still runs the development copy of the program
However, pressing F5 to refresh after adding or removing the development library and then immediately running the program always works ok. I believe that somehow the i5 system is "caching" the program location but not the data file location. That is, after adding the development library at the top of the library list, the system finds the development data files but continues to find the normal (not the development) program. The opposite happens when removing the development library from the library list.
Can someone shed some light on what might be happening. I know that I have provided a lot of information, but possibly not yet enough information. Any help is appreciated.
Thank you!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi
This sounds as if the if the program is doing one the following.
there is a cl that performes an ovrdbf share(*Yes) and maybe an opnf
on the first call the live program opens the file, this the is open for the whole job
end the live program - the file is still open and shared
change the library list
calls the new version of the program, as the old file is already open it will try to use this, the crash then closes the file so the second call opens the version in the library list.
the same happens in revers when you remove the test library.
when running the program do a dspjob and check for the file overrides (Option 15) you may see
Opt File Level Type Keyword Specifications
Myfile 9 DB SHARE(*YES)
try running
RCLRSC before the second call
Dave
Hello all,
Our system manager contacted IBM support. They had us run some kind of start trace (something like STRJOBTRC, not sure). Then they had us recreate the problem, stop the trace, and email them the spool file. Perhaps IBM can also shed some light on the situation.
Dave, I believe the program is being cached, but the data file is being found correctly. Are your questions and suggestions about the data file, or do they concern the program, also? I apologize for being possibly redundant, but some of this IBM system stuff is much different than other operating systems. :)
Tom, thanks for your help, also.
I will respond as soon as I found out anything about the activation groups and/or the db share possibilities. Thanks, again!
F5 to refresh what?
What screen is the developer "refreshing" when this happens?
Most likely, it is an application screen, and one of your applications is holding a file open, or possibly pinning a program on the call stack and pressing F5 (or the process of recovering from programs crashing) causes the file/program to be closed. RPG programs that RETURN without setting on LR can do this, for example.
Easy to test.
Sounds like this is easy to reproduce, so get up to the point right before you get the level check, and then either work with the job from another session or so a Sysreq-3 and look at open files and the call stack to see if a file or program is being held open. Then press F5 and see if the file/program gets closed.
If so, this is normal behavior for applications that RETURN without shutting down. Your developer will need to take the proper steps to shut down running applications before switching the library list.
- Gary Patterson
Check out my EE profile: http://www.experts-exchang
Great question from Gary -- refresh what? That has an excellent chance of influencing the resolution.
Dave pointed out the DSPJOB command option 15. Also note option 14 for 'open files' and, on the second page, option 18 for 'activation groups'. Any of those three might provide the clue your developer needs.
Be aware that RCLRSC could likely be inappropriate in a production job. It can be handy for testing and can illuminate things that give trouble, but it should avoided if activation groups are involved. There are alternatives for actual production work.
Tom
Update: IBM is working a ticket for us on this. They have asked for a STRTRC to trace the error as it happens. Also, they are having me do a wrkjob (*print) for the job in question during each step/command issued.
IBM is also asking about the open file situation. It seems that you guys and IBM are on the same trail. I will investigate your comments, and maybe pass them along to IBM if needed. I will update this question as soon as I have more information.
Thank you to everyone for your help so far! :)
Business Accounts
Answer for Membership
by: tliottaPosted on 2009-10-27 at 13:11:43ID: 25676903
richard_crist:
First obvious possibility is an activation group connection. How is the program defined in relation to activation groups? Does it run *CALLER? *NEW? Named activation group? If named, is the activation group reclaimed after calling the program? What environment exists when the program is called -- are activation groups in control when the CALL is executed? (Other than the default activation group, if the program runs as *CALLER.) How does it open/close files? (Are any overrides in effect?)
Tom