Provide a SET INTERCEPT command
Brought to you by:
rexx
A SET INTERCEPT command could be of the form:
SET INTERCEPT cmd_or_macro_name intercepting_macro_name
SET INTERCEPT ON | OFF | DELETE [cmd or macro name]
This would allow an intercepting macro to examine the invoking command or macro string irrespective of the origin, which should be indicated: CMDLINE, Fkey, program_name, etc. and take some pre/post/ignore action. The
intercepting macro would need a special command to bypass further intercepting.
Associated QUERY/EXTRACT would be needed, of course.
An alternative name might be TRAP.