gtpc2m4dC/C++ Language Support User's Guide

keyrc-Restore Protection Key

This function restores the current program status word (PSW) protection key to its normal value (protect key of working storage).

Format

#include   <tpfapi.h>
void       keyrc(void);

Normal Return

Void.

Error Return

Not applicable.

Programming Considerations

Examples

This example restores the storage protection key after a call to the cinfc function in which the CINFC_WRITE option was specified.

#include <tpfapi.h>
     .
     .
     .
char *field_ptr;
     .
     . /* can only read protected storage */
     .
field_ptr = cinfc(CINFC_WRITE, CINFC_CMMINC);
     .
     . /* can read and write protected storage */
     .
keyrc();
     .
     . /* can only read protected storage */
     .

Related Information

cinfc-Control Program Interface.