On Mon, Mar 16, 2015 at 5:31 PM, Charles Mills <[email protected]> wrote:
> I don't really know but my logic goes like this:
>
> You can only turn JCSBAUTH back on if you are key 0, otherwise you will S0C4. 
> So you could set key 0, and then turn JSCBAUTH off, "do stuff," and then turn 
> it back on again -- but if you are going to run for any length of time "doing 
> stuff" in key 0 you might just as well leave JSCBAUTH on, and if on the other 
> hand you are going to go to user key, you are stuck there once you turn 
> JSCBAUTH off.
>
> Does that make sense?
>
> Charles

Charles,

I just had a thought (and it's lonely). You start off APF authorized,
key 8 as a "normal" APF program. You want to run program "B" from the
STEPLIB, but without APF authorization. Perhaps the simplest way is to
use SYNCHX something like:

   LOAD EP=B
   ST R0,EPA_B
   MODESET KEY=ZERO
   USING PSA,0
   L  R3,PSATOLD MY TCB
   USING TCB,R3
   L  R3,TCBJSCB GET JSCB ADDRESS
   DROP R3
   ICM R3,B'1000',=X'00' CLEAR HIGH BYTE
   USING IEZJSCB,R3
   NI JSCBOPTS,255-JSCBAUTH NOT APF
   L R15,EPA_B
   SYNCHX (15) INVOKES PROGRAM B IN TCB KEY
   OI JSCBOPTS,JSCBAUTH RESTORE APF AUTHORIZATION
   MODESET KEY=NZERO

The SYNCHX is the magic which allows your code to stay key 0 while
invoking the other program "in line" in key 8. When the program
returns, your code is still key 0. At which point you restore APF
authorization and continue on.



-- 
If you sent twitter messages while exploring, are you on a textpedition?

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to