This general macro restores the current program status word (PSW)
protection key to its normal value (protect key of working storage) or to the
value saved by the CINFC macro.
Format
- label
- A symbolic name can be assigned to the macro statement.
- OKEY=YES
- Restores the original protection key that was saved by the previous CINFC
macro call with the W option specified. See CINFC-Control Program Interface for more information about the CINFC macro.
- Note:
- The OKEY=YES parameter requires restricted authorization (OPTIONS=(RESTRICT))
on the IBMPAL macro.
Entry Requirements
Register 9 must contain the address of the entry control block (ECB) being
processed.
Return Conditions
- On return, the current PSW protection key is identical to the key assigned
to working storage (ECBs, data blocks, and fixed unprotected core).
- On return, when the OKEY=YES parameter is coded the current PSW protection
key is identical to the PSW protection key before the previous CINFC macro
call with the W option specified. See CINFC-Control Program Interface for more information about the CINFC macro.
- Control is returned to the next sequential instruction (NSI).
- The contents of R14 and R15 are unknown. The contents of all other
registers are preserved across this macro call.
- The condition code is saved during execution of this macro.
Programming Considerations
- When this macro is used with the change protection KEYCC macro, it must be
issued following the KEYCC macro and before:
- Storing into any of the normally unprotected areas (ECB, held data blocks,
and fixed unprotected core storage)
- Issuing the WAITC macro or any macro with an implied wait
- Issuing a fast link macro.
See TPF System Macros for more information about
the KEYCC macro. See WAITC-Suspend Processing for ECB I/O Completion for more information about the WAITC macro.
- When writing code to support application code that interfaces with system
code or provides new functions, you must preserve the application
environment. One environmental consideration is the storage protection
key. It may not be correct to assume that the caller is always
executing with the working storage protection key. The OKEY function is
useful in restoring the protection key value that was in use by the
application. You must use this function (by coding OKEY=YES) after the
CINFC macro with the W option specified has been issued, but before invoking
any system functions or programs that may, in turn, call the CINFC macro with
the W option specified. When this is not possible, the saved protection
key, which is in CE2OKEY, must be saved elsewhere and restored just before
issuing the KEYRC macro with OKEY=YES coded.
See CINFC-Control Program Interface for more information about the CINFC macro.
- This macro can be executed on any I-stream.
Examples
None.