At 07:36 -0400 on 06/07/2012, Peter Relson wrote about Re: Getmain question:
The only time GETMAIN RU can have a non-0 RC is when CheckZeroRC=YES is specified. Thus, there is a *useful* return code for GETMAIN RU only when CheckZeroRC=YES. So GETMAIN RU has a "defined return code" of 0 but, as Binyamin wrote, that is meaningless in this case since for this invocation the R15 is always 0 upon return (as it abends if the obtain fails).
Since the code checks R15 and issues an error message for Non-Zero (ie: A failure) I wonder why not just go with GETMAIN RC (not RU) to avoid the ABEND since there is a failure trap test in the program. I know that is query is not about what went wrong but IMO it is something that should be addressed when the real reason is found and any needed coding changes are made.
