@Peter, @Bin, it's really failing and there is no flaw (I believe!) in the
SPKA code. Not much code or dump is relevant. Hard to go wrong with SPKA
0(R1) when the contents of R1 in the minidump is xxxxxx80 (and yes, the
instruction is still B20A1000 in the display of the code near the PSW
address).

@Jim has the key. The problem is from earlier MODESET macros. I have not
totally put my finger on the exact necessary and sufficient sequence, but
what @Jim seems to be saying, and what I *believe* I am seeing, is the
following:

*  Enter APF-authorized and with Key=8
      MODESET KEY=ZERO,MODE=SUP
*  do stuff (one)
      MODESET MODE=PROB
*  do stuff (two)
      MODESET KEY=NZERO

leaves you in a state in which SPKA 8's will fail.

Or as @Jim puts it

,MODE=PROB,
 MODE=SUP 
    Specifies that the PSW problem state indicator (bit 15) is to be either
turned on (PROB) or turned off (SUP). If the MODESET operation completes
with a problem state PSW, the caller?s PSW key mask (PKM) is set according
to the following rules: 

?The bit matching the resulting PSW key is set on.
?The bit matching key 9 is set on. 
?For a task attached with ATTACHX using the KEY=NINE parameter, the  bits
that were on in the PKM of the ATTACHX issuer are set on. 
?All other bits are set off.

In other words, if you issue a MODESET MODE=PROB in key zero you lose the
right to issue SPKA 8.

I *think* (still running experiments) that simply following that last
MODESET above with MODESET MODE=PROB solves the problem, or probably just
adding ,MODE=PROB to that last MODESET will do the trick.

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of Peter Relson
Sent: Tuesday, December 13, 2016 5:30 AM
To: [email protected]
Subject: Re: Question on SPKA and Control Register 3

>I had guessed that an APF-authorized but otherwise "ordinary" program 
>running with Key 8 would be able to issue an SPKA with an "address" of 
>xxxxxx8x in problem state without getting a S0C2.

Whether APF-authorized or not, it can. If your program is getting S0C2, then
you are most likely not doing what you think you are doing.

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

Reply via email to