On the face of it, there is nothing special about a super procedure. That is, there is nothing specific in the ABL syntax of an ABL procedure file to identify it as a super procedure. Rather, it is how the procedure is referenced by other procedures that makes it a super procedure. Having said this, there are definite guidelines to follow when you build a procedure file that you want to use as a super procedure. These guidelines are discussed in the next section. First, you’ll examine the syntax used for super procedures.

An ABL procedure file must be running as a persistent procedure before it can be made a super procedure of another procedure file. So the first step is that the code somewhere in the application must run the procedure PERSISTENT:
RUN superproc PERSISTENT SET superproc-hdl.

ADD-SUPER-PROCEDURE() method

Any application procedure with access to the procedure handle of the super procedure can then add it as a super procedure to itself by using the ADD-SUPER-PROCEDURE( ) method:
THIS-PROCEDURE:ADD-SUPER-PROCEDURE( superproc-hdl [ , search-directive ] ).
Or, in the more general case, it is possible to add a super procedure to any known procedure handle:
proc-hdl:ADD-SUPER-PROCEDURE( superproc-hdl [, search-directive ] ).
In addition, you can add a super procedure at the Session level, using the special SESSION handle, in which case its contents are available to every procedure running in the OpenEdge session:
SESSION:ADD-SUPER-PROCEDURE( superproc-hdl [, search-directive ] ).

The optional search-directive can be either SEARCH-SELF (the default) or SEARCH-TARGET. The significance of this option is discussed in the Super procedure guidelines section.

REMOVE-SUPER-PROCEDURE() method

Once you add a super procedure, you can also remove it (with REMOVE-SUPER-PROCEDURE() method) from its association with the other procedure, whether you reference it as THIS-PROCEDURE, SESSION, or some other handle:
proc-hdl:REMOVE-SUPER-PROCEDURE( superproc-hdl ).
You can execute multiple ADD-SUPER-PROCEDURE() methods for any given procedure handle (including SESSION). The super procedure handles form a stack, which is searched in Last In First Out (LIFO) order when the AVM encounters a RUN statement or a function reference at run time. That is, the super procedure added last is searched first to locate the entry point to run. At any time, you can retrieve the list of super procedure handles associated with a procedure using the SUPER-PROCEDURES attribute of a procedure handle:
proc-hdl:SUPER-PROCEDURES

This attribute evaluates to a character string holding the list of super procedure handles (starting with the last one added, therefore indicating the order in which they are searched) as a comma-separated character string.