A library can export a procedure that is declared to be an entry point in yet another library. When a program calls this entry point, the template of the library to which the procedure is declared to belong is searched for an entry point with the same name as that of the called entry point in the directory for this library.
For example, assume the following declarations have been compiled:
LIBRARY L; PROCEDURE LIBPROC; LIBRARY L; EXPORT LIBPROC;
When another program calls entry point LIBPROC of this library, the template for library L is searched for an entry point named LIBPROC. When found, the entry point LIBPROC of library L is then called.
On the other hand, assume the following declarations have been compiled:
LIBRARY L; PROCEDURE LIBPROC; LIBRARY L; EXPORT LIBPROC AS "P";
Another program calls entry point P of this library, and the template for library L is searched for an entry point named P. If it is found, that entry point is called. If that entry point is not found, a run-time error is given and the calling program is terminated. In either case, procedure LIBPROC of library L is not executed. For more information on libraries, refer to Library Facility.
A library entry point must not declare any OWN arrays. An attempt to execute a library entry point that declares an OWN array results in a run-time error. For more information on OWN arrays, refer to the Task Management Programming Guide.
If a library exports a procedure reference array, a program importing that procedure reference array can access the procedures in that library. A program cannot assign into an element of an imported procedure reference array. If such an assignment is attempted, a compile-time or run-time error occurs.
Programs that export procedure reference arrays cannot be used for binding.

