File hook enhancement: two new file hook events have been added to hook ISAM add (5) and delete (6) operations.
The two events have been added to HOOK.DEF as:
Symbol |
Value |
Meaning |
---|---|---|
HFE_ISAM_ADD |
&h00080000 |
after ISAM 5 (add); see History |
HFE_ISAM_DEL |
&h00100000 |
after ISAM 6 (delete); see History |
Note that unlike most of the other file hooks, these don't come in PRE- and POST-flavors.
For the ADD hook, the record data supplied to the hook routine (rec parameter) will contain the key rather than the record data. Since ISAM adds are followed by a WRITE statement, you can hook that to get the contents of the record itself.
For the DEL hook, the record data of the record being deleted is supplied to the hook routine in the pre'rec parameter. The rec parameter should be ignored.
The sample hook program FHOOKTST3.BP and hook subroutine FHOOK1.SBX in [908,50] of the EXLIB have been updated to illustrate both hooks.