On 20 April 2012 17:19, Micheal Butz <[email protected]> wrote:

> A S0C4 reason code 4 means the storage key and the PSW key don't match

There are other possible reasons for an 0C4-04 abend, but 0C4-04 is
always a protection exception of some sort.

> typically trying to access storage key 0 when the PSW key is key 8

Yes, typically.

> Does it matter what the PSW key at the time of the STORAGE OBTAIN was e.g.

> 1.       Obtaining storage from subpool 0 where the storage key is 8 and PSW
> key at the time for what ever reason was in KEY 0.
>  Would I have to set the PSW Key to 0 if I were trying to access that
> storage later on say while running in some other task because when I did the
> STORAGE OBTAIN the PSW KEY 8 - 11 was 0

Are you trying to ask if the PSW key at the time of STORAGE OBTAIN or
GETMAIN determines the key of the storage that is obtained? If so, the
answer is "it depends". Both the form of the macro you use to obtain
storage, and the subpool you obtain it from can affect the key of that
storage. You need to read carefully both the description of the
keywords on the macro you are using, and that of the subpool you are
specifying. Some subpool requests return storage with a key of the
caller's PSW key; others do not. There are further subtleties. The
summary of subpools in section 1.8.3 of the MVS Diagnosis Reference is
very helpful, but is not entirely a substitute for reading the macro
descriptions carefully.

> 2.       The same situation would be then true if access CSA storage subpool
> 241 with Key=8 ( Iknow a no no) but the PSW KEY was 0. Later on when trying
> to access/modify the storage would I have to set PSW key 8 - 11 have to be 0

An instruction executed when the PSW key is 0 will not encounter an
exception because of key-controlled storage protection, but it can
still fail if page protection or low storage protection is in effect.

> .         Of what significance does is the key the TCB (TCBPKF) since it
> seems only PSW KEY 8 - 11 and the key the page of the storage is seems to be
> relevant

Significance to what? To the key of the storage that you obtain? Or to
other things? Certainly TCBPKF has no direct effect on what happens
during the execution of a machine instruction.

Tony H.

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

Reply via email to