Thomas David Rivers
2021-01-31 23:34:11 UTC
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. -
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. -
--
***@dignus.com Work: (919) 676-0847
Get your mainframe programming tools at http://www.dignus.com
***@dignus.com Work: (919) 676-0847
Get your mainframe programming tools at http://www.dignus.com