I have a program in which I specify infsr(*PSSR) on a file. This program uses the callp command to call another program which in turn uses the callp to call another program. In this third program, if an error occurs on an IO command on a file that is different than the one upon which I specified the infsr(*PSSR) in the first program, the error is passed back to the first program and is handled by the *PSSR. Why is my *PSSR handling errors for files other than the one I specified? Is there a way to have a *PSSR only handle errors for a given file?
Software/Hardware used:
ASKED:
February 13, 2007 4:56 PM
UPDATED:
January 1, 2010 10:36 PM
One other thing (I really ought to reread before replying) is that you can specify the (e) extender on the CallP operation to have the error caught when you return to your program.
That would stop the *PSSR handling the error generated by the sub-procedure.
Jonathan
Just in case, it should be clarified that CALLP can be used for calling programs or procedures. Verify whether the prototype has EXTPGM() or EXTPROC(). The default error handling process may be affected.
If the other programs were created by first compiling a module and then running CRTPGM, the *MODULE object can be part of the overall program. An external program call might not actually be happening.
Tom