gtpc2m5qC/C++ Language Support User's Guide

rehka-Rehook Core Block

The function transfers the information from an 8-byte field to a specified core block reference word (CBRW) in the ECB, and zeros the 8-byte field. This allows access to the specified block by successive ECBs. If the field specified is in global storage, the glob function is used to get the address of the specified global, and the global function is used to update the field. The core block referred to by the 8-byte field must have been unhooked by this function.

Format

#include   <tpfapi.h>
void   rehka(enum t_lvl level, enum t_hook_type glob_indicator, ...);

level
One of 16 possible values representing a valid data level from enumeration type t_lvl, expressed as Dx, where x represents the hexadecimal number of the level (0-F). This argument represents the CBRW from where information is to be transferred from.

glob_indicator
This argument must belong to enumeration type t_global specifying 1 of 2 possible values:

REHKA_GLOBAL
Specifies that the save area is in protected storage.

REHKA_UNPROTECTED
Specifies that the save area is not in protected storage.

...
This argument is either an address if the 8-byte save area is not in protected storage or a global tag if the field is in protected storage.

Normal Return

Void.

Error Return

Not applicable.

Programming Considerations

Examples

The following example rehooks a core block to level 0 from a location pointed to by save_ptr.

#include <tpfapi.h>

  ·
  ·
  ·
char save_area[8];
  ·
  ·
  ·
rehka(D0, REHKA_UNPROTECTED, save_area);
  ·
  ·
  ·

The following example rehooks a core block to level 0 from a location specified by the global tag _s2hok.

#include <tpfapi.h>

  ·
  ·
  ·
rehka(D0, REHKA_PROTECTED, _s2hok);
  ·
  ·
  ·

Related Information

unhka-Unhook Core Block.