Exits/Protocol Exits

I want to call an exit after table selection, but before table maintenance. How can I do that?

To call an exit between table selection and execution of a selected function, e.g., table maintenance, define the exit via control table $TAB4PTC24. You can find details about control table entries and a sample in BOIDOC-209a_Config.

See also:

BOIDOC-209a_Config

How do I display a self-defined message in an exit?

How do I determine the currently active instance within a protocol exit?

You can determine the current instance via the TABEX4 Interface.

For this, you need to import the TABEX4 Interface to your exit program by using "%use $TAB4PTINF". That allows you to determine the currently active instance by using  "$TAB4_INTF.getInst()", e.g.:

[...]

%use $TAB4PTINF

dcl instance char(08)

instance = $TAB4_INF.getInst()

[...

See also:

BOIDOC-209a_Config