"In this case, the control program places the module in subpool 252. When 
choosing between subpools
244 and 251. the control program uses:
• Subpool 244 only when within a task that was created by ATTACHX with the 
KEY=NINE parameter
• Subpool 251in all other cases
Subpool 244 is not fetch protected and has a storage key equal to your PSW key. 
Subpool 251 is fetch
protected and has a storage key equal to your PSW key. Subpool 252 is not fetch 
protected and has
storage key 0."


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [[email protected]] on behalf of 
Thomas David Rivers [[email protected]]
Sent: Sunday, January 31, 2021 6:34 PM
To: [email protected]
Subject: STORAGE KEY of loaded executable

I have a situation where I LOAD a program, with a PSW KEY of 8,
then branch to it.

The program switches to KEY 9, but wants to reference some
data in the loaded CSECT (say, for example, a =F constant in the
literal area.)

This blows up, I'm guessing because the key isn't the same as the
loaded module's memory (the address appears to be fine.)

This brings up a couple of questions:

   When you LOAD a program, how do you control the KEY
  for the memory the LOAD'd program occupies?  Can you, or
  does z/OS always LOAD (non-auth) programs in KEY=8?

   When you switch KEYs, how do you retain access to the
 program's memory for constants and things?

    And - to get more complicated - when a blob of AUTHORIZED
 code loads something, say, some system exit or something; what
 is the STORAGE KEY of the memory that code is loaded in.  That
 program may get entered with a KEY=0, but will need access to
 it's own CSECT.

   And - It's not quite clear to me, but does the STORAGE KEY
 get examined during the fetch-execute cycle of program
 execution.  If my module is in memory with KEY=8, and I change
 the key with an SPKA instruction; can I actually retrieve the
 next instruction to execute?   Just where does the key-check occur?

    - Dave R. -

--
[email protected]                        Work: (919) 676-0847
Get your mainframe programming tools at 
http://secure-web.cisco.com/14WxsDY-ayEIw4Txd4CUMcWempgt1bm-X7QTZLrVnB1i6y_TA8841bEosQ2fvFaGtux7s2inbpaPacpuiMargzng8gwxFV5gOEoaTqqAVgLlVYVvpTX2b8HEPP7qMh32meHrzoDeYi2YlVQSamQ6-5nyyePmZACHdPPnhUvNFSMsPQLj-4l8ESe4ScBrJfxBMIHHKL2yQwzbh8HI3XoyU_GR8mttfo6SMzk6InfeXYnQxY4NusZuxHoEyR2dPPaP-Z-X9x6iVDSEyz0XmBMh2V9XS7D-WNOSRJI_UP0aL0jgj67GzxbodARuYB0l7Spm8fL2KJjam5mKuznS8nPE3NzMsL-xju1mRq3tY0IrtZmxs7JWt_YMmIWy1oG3T82MK-nf30qmZ5Ad5Hnoaw941mHq5tx8ddGWQ_fD4wybqxyPy0EysALY5YXjajS7ipLcO/http%3A%2F%2Fwww.dignus.com

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

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

Reply via email to