DRA --> User's guide --> options

Option HOOK

Causes DRA to activate certain hooks. These hooks are EX instructions generated by the compiler when the program is compiled with compiler option TEST(HOOK). These are the same hooks as used by the Debug tool.

The only valid specification is HOOK()

When this option is specified DRA activates the following hooks:
ENTRY executed at entry of the program
EXIT executed at exit of the program
CALL executed before calling another program
RETURN executed after return from another another program

When the application program executes one of these hooks then LE fires event 133. This causes DRA to get control. In response, DRA will do the following:

ENTRY
Trace the name of the program that was entered
Trace the CPU-time at time of entry

EXIT
Trace the name of the program that is exiting
Trace the CPU-time at time of exit

CALL
Trace the name of the calling program (caller)
Trace the name of the program being called (callee)
Trace the CPU-time at time of call

RETURN
Trace the name of the calling program (caller)
Trace the CPU-time at time of return