On Wed, Aug 27, 2014 at 9:30 AM, SUBSCRIBE IBM-MAIN Harold Gray
<[email protected]> wrote:
> I have a working SUBSYS interface. My code processes a few of the interfaces
> (OPEN, ALLOC,... etc.) and previously resided below the line. I am trying to
> move the code above the line. Everything works fine except one item. In my
> OPEN routine, I put my input/output routine's address into the field ACBINRTN
> which is now an above the line address. As it turns out, when JES (IGG019DJ)
> invokes my I/O routine, it does a BASR R14,R15 and is in AMODE 24. This
> causes a S0C4 as it doesn't get to my code but branches to the 24-bit address
> instead. R15 has the correct address in it (above the line). I tried
> setting the high order bit to 1 to signify this routine is a 31-bit address
> (this is a technique I had to use to get the other routines to be invoked in
> the correct AMODE by z/OS). I would have thought that z/OS would have the
> capability to do the AMODE 31 call for I/O at my level (2.1).
>
> Any ideas on how to let JES exit know to invoke ACBINRTN in AMOCE 31?
>
> Thanks,
>
> Harold Gray
>
Off hand, given what you have said, I don't know of any way to do
that. Being a bit lazy, I would just create an RMODE(24) stub CSECT
which just invokes my main line code using a BASSM to switch to
AMODE(31). The stub code would could be very small:
STUB CSECT
STUB RMODE 24
STUB AMODE ANY
L R15,REALRTN
BSM R14,R15
REALRTN DC V(realcsect+X'80000000')
Make sure that your "realcsect" routine returns control with another
BSM such as BSM R0,R14 to switch back to the caller's AMODE. Now, the
above a couple of different ways. I tend to use then binder parameter:
RMODE(SPLIT) and bind into a PDSE library (not a PDS!). That way I
have a single program object in my library and program fetch will put
STUB into RMODE(24). If you can't do that for some reason, the I would
create that same code segment in my CSECT, but I would do a STORAGE
OBTAIN to get 16 bytes of RMODE(24) storage and just MVC that code
into storage. Then use that address in the ABCINRTN field.
--
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan
Maranatha! <><
John McKown
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN