|
I assume the called CGI program stays active. If the called RPG program does a return, instead of an exit (seton lr), the files in that program in the call stack can remain open. Although it adds some overhead, a simple solution would be to call the RPG program that leaves the files open from another RPG program that does an exit instead of the return. The exit in the calling RPG program forces all sub programs to close completely on the job call stack. That should fix your problem with open files in the called RPG program.
If you want to decide dynamically when to close the files, use a conditional return or exit in the new calling RPG program that calls the RPG subprogram.
==================================
MORE INFORMATION ON THIS TOPIC
==================================
Check out these Best Web Links on Web development.
Ask the Experts yourself: Our Web development gurus are waiting to answer your questions.
Ask your Web development & WebSphere questions -- or help out your peers by answering them--in our WebSphere & Web Development Forum.
|