|
Property |
Value |
|---|---|
|
Kind |
Client library or connection library |
|
Type |
EBCDIC string |
|
Read |
Anytime |
|
Write |
Client libraries: While not linked Connection libraries: While not ready and no connections are linked |
|
Default |
Value of INTNAME library attribute |
Explanation
If the LIBACCESS library attribute is set to BYFUNCTION, then the FUNCTIONNAME library attribute identifies the function name of the library program that is to be linked to. The function name is associated with a library object code file title by the SL (Support Library) system command. You can also establish SL function names programmatically through the DCALGOL SETSTATUS function.
The operating system stores the mappings between SL function names and library programs and links to the appropriate code file if a function name is used. The function name makes it possible to change to a differently titled library program without having to recompile all the client programs that use the library.
Not all library programs have associated function names, although any library program can be assigned one or more function names by an SL command. A library program that has an associated function name is called a support library.
An SL command can do any of the following:
-
Display the current function names and their associated object code files.
-
Assign a particular library object code file to a function name, without affecting any programs that are currently using the library. In some cases, the change does not take effect until the current invocation of the library thaws and resumes execution. The associations between function names and library object code files survive a halt/load or a CM (Change MCP) system command.
-
Create a new function name and assign the object code file that is initially associated with it.
-
Delete an existing function name, without affecting any processes that are currently using the library. In some cases, the deletion is denied if a frozen invocation of the library currently exists.
Client programs can access a library directly by object code file title even if a function name has been defined for the library. However, undesirable side effects can result if the first client program to access a library does so by object code file title instead of by function name.
For example, if a library has a SHARING value of SHAREDBYALL and the first client program accesses the library by object code file title, then the library process inherits several task attributes of the client program, including USERCODE, FAMILY, and SOURCESTATION. However, if the same library is first accessed by function name, these task attributes are not inherited.
In addition, system libraries must first be accessed by function name, so they receive their special privileges. For a discussion of this and other security issues related to the SL command, refer to Security Considerations for Libraries later in this section.
The FUNCTIONNAME library attribute can be specified in a library declaration, a library attribute assignment statement, or a LINKLIBRARY function.
Direct Library Linkages
The FUNCTIONNAME library attribute has no effect when direct library linkage is used. Refer to Directly Linking to Server Libraries and Directly Linking Connection Libraries earlier in this section.
Connection Libraries
For connection libraries, the FUNCTIONNAME library attribute has meaning only for the library on the requesting side of the linkage attempt. If the requesting library has a LIBACCESS value of BYFUNCTION, then the FUNCTIONNAME value of the requesting library identifies the library program that contains the responding library.
The FUNCTIONNAME attribute affects the entire connection library. If you want to link the various connections BYFUNCTION to different library programs, you can specify a different FUNCTIONNAME attribute in each LINKLIBRARY request. The action of specifying a different FUNCTIONNAME causes a value override to the BYFUNCTION value for the LIBACCESS attribute for the LINKLIBRARY request. For example, the following ALGOL statements link connections 0 and 1 of connection library CL1 to different library programs:
CLTYPE LIBRARY CL1(INTERFACENAME = “CLF.”, CONNECTIONS = 2); REPLACE FNAME BY “DELTA.”; RSLT:= LINKLIBRARY (CL1[0], FUNCTIONNAME = FNAME); REPLACE FNAME BY “GAMMA.”; RSLT:= LINKLIBRARY (CL1[1], FUNCTIONNAME = FNAME);
In order for linkage to complete, the requesting connection library and the responding connection library must also have matching INTERFACENAME library attribute values.

