On 10 April 2012 18:07, Micheal Butz <michealb...@optonline.net> wrote:

> I have a piece of CSA storage sp 241
> That I am obtaining in key 8
> (I know this is a no no)

No! No...!

> When go to supervisor state should i code KEY=NZERO on the modeset I am 
> assuming
> NZERO is 8 or should I specifically set the storage key to 8

Again, it rather depends on what you want to accomplish by being in
supervisor state. In the very old days, say in the MVT era, it was
common to treat supervisor state and key zero as much the same thing.
>From the very beginning of MVS, these two were clearly separated.
While either one is generally, but by no means always, sufficient for
calling most authorized system services, running with a key zero PSW
is very much riskier than running with a supervisor state PSW. With
the former, your program can accidently clobber most of the virtual
storage visible to it; with the latter, your program has only a tiny
chance of accidently executing a damaging privileged instruction.
Sadly there is still a lot of code out there chock full of MODESET
MODE=SUPV,KEY=ZERO .

KEY=NZERO restores the PSW key to "what it was" from the TCB. This is
likely to be 8, but there are other possibilities.

> As I am getting a system 201 durning a post/wait of an ECB from this storage

Well, during the WAIT, not the POST. You cannot WAIT on an ECB that is
in storage with a key different from your PSW key. Align them,
somehow. Your putting the ECB in common user-key storage suggests that
you expect an unauthorized program in another address space to do the
POST. If you must use this "no no" approach, then you must WAIT with a
PSW key of 8. Of course anyone else in the system can do the same as
they please.

In passing, may I ask if you develop a product that is sold to others,
or does this code run only in-house?

Tony H.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN

Reply via email to