It is quite likely case that you do not want to use BSA. BSA was created 
to help solve a problem whose nature I no longer specifically remember, 
but I don't think it is anything like yours. I suggest that you look 
elsewhere.

You are authorized so you have a lot of choices with respect to using 
different keys. Are you trying to avoid running in supervisor state?
If you're just trying to switch (back and forth) between TCB key and key 9 
you don't need any authorization. z/OS has set up the jobstep task's PKM 
with the TCB key plus key 9 represented. SPKA is semi-privileged, so this 
setup means that SPKA will work fine to switch back and forth between TCB 
key and key 9.

>The only reason listed for a Special Operation exception for BSA is if 
>R6 is non-zero when returning to base authority.

That is not what is documented. What is documented is:
R2 must be zero; otherwise, a special-operation exception is recognized.

The PoOp is very precise. It needs to be followed with similar precision.
R2 refers to the specification in the instruction, not the contents of the 
register identified by that specification.
PoOp goes on to say

The initial contents of general registers R1 and R2 are ignored.

Thus you would want BSA R5,0 (or BSA anyreg,0)

Peter Relson
z/OS Core Technology Design

Reply via email to