Library Directories and Templates

The directory and the template are date structures built by the compilers. They contain the information used by the operating system to match entry points in a library with entry points declared in a calling program.

When a program exports entry points and contains a FREEZE statement, the object code file for that program contains a library directory. One directory exists for each block that contains an EXPORT declaration. After a library freezes (executes a FREEZE statement), only one directory is in effect until the library program finishes executing.

A library directory contains a description of all the entry points in the library. This description includes the following information:

  • The name of the entry point

  • The type of the entry point

  • A description of the entry point parameters

  • Information on how the entry point is provided. For more information, see Linkage Provisions.

When a program declares a library and entry points in that library, the object code file for the program contains a library template that describes the library and the declared entry points. One template exists for each library declared in the calling program. A template contains the following information:

  • A description of the attributes of the library

  • A description of all the entry points of the library that are declared by the program. Each description includes the following information:

    • The name of the entry point

    • The type of the entry point

    • A description of the entry point parameters

The SETACTUALNAME function can be used to change the name of an entry point in an unlinked library template. For more information, refer to SETACTUALNAME Function.