The linked-to post is not about the work area being "shared" per se. The work
area is for use by the called exit routine for the duration of that exit
routine's being in control. There can be no assumptions about contents on entry.
Basic debugging is necessary for any error. If you're going to ask for help,
then provide the information that those who might help would need.
The OP did not post the complete exit routine. For all I know, the use of the
"execute form" of WTO is incorrect and is not properly initialized and
incorrectly assumes some storage is zeroes but might not be.
The OP did not post anything about just where the 0C4-11 occurred.
Making the readers guess is not the right approach.
Binyamin wrote:
<snip>
Is the 0C4 in your code or did you possibly mess up other storage?
Look at the PSW and registers. Look at the work areas.
</snip>
Exactly.
<snip>
"Is WTO even legal from IEFU86?"
WTO is just used to test my exit.
</snip>
That does not answer to the question. But the odds are that a BRANCH=YES WTO
will work according to specifications if it is done correctly, whether or not
you should use it within an exit such as IEFU86.
<snip>
STORAGE OBTAIN,LENGTH=WORKLEN,ADDR=(R1),SP=245
LTR R15,R15 Storage Obtain OK ?
JNZ FIN Non, on sort sans RELEASE
</snip>
STORAGE OBTAIN defaults to COND=NO. This invocation would abend (not return) if
the storage could not be obtained.
Thus there is no reason to check R15 afterwards. Only if you also specify
CHECKZERO=YES for a COND=NO STORAGE OBTAIN could you successfully obtain the
storage and get a non-zero return code.
Charles M wrote
<snip>
STORAGE OBTAIN: I think under the covers it is the same service as GETMAIN.
</snip>
That would depend on how far under the covers you go, and whether you specify
LINKAGE= on the STORAGE invocation.
STORAGE OBTAIN with LINKAGE=SVC or LINKAGE=BRANCH is exactly the same service
as GETMAIN.
STORAGE OBTAIN with the default LINKAGE=SYSTEM has different initial and final
processing than GETMAIN. The "middle" is common to both.
<snip>
Not sure if it is possible in that environment to get back to user key but if
you can it might be worthwhile.
</snip>
Switching to user key would likely be a very wrong thing to do.
And a reminder: questions about how z/OS works (such as whether a work area
provided on a z/OS interface has certain characteristics) do not belong on
assembler-list. IBM-Main is a much better choice, getting to a wider audience
of folks who might help.
Peter Relson
z/OS Core Technology Design