gtpc2m5q | C/C++ Language Support User's Guide |
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
- The location of the last parameter will contain the contents of the CBRW
specified by CE1CR(literal).
- The use of this function must be limited to those functions having unique
buffering requirements that demand a specific block be capable of access by
successive ECBs. It is not to be used to obtain use of a
free data level.
- The data level specified must not have an attached block.
- The rehka function may use the global function.
- If the save area supplied is a synchronizable global field that needs to
be locked before modified, it then becomes the user's responsibility to
call the global function with the GLOBAL_LOCK, GLOBAL_UNLOCK or GLOBAL_SYNC
option, appropriately.
- If an incorrect parameter is given, a system error with exit
occurs.
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.