LIBRARY function
- Last Updated: February 11, 2026
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
Parses a character string in the form path-name<<member-name>>,
where path-name is the pathname of an ABL r-code
library and member-name is the name of a file
within the library, and returns the pathname of the library. The
double angle brackets indicate that member-name is
a file in a library. If the string is not in this form, the LIBRARY
function returns the Unknown value (?).
Typically, you use the LIBRARY function with the SEARCH function to retrieve the name of a library. The SEARCH function returns character strings of the form path-name<<member-name>> if it finds a file in a library.
Syntax
|
- string
- A character expression whose value is the pathname of a file in a library. In Windows, the pahtname cannot contain characters outside of the non-Unicode code page. See Internationalize ABL Applications for more information about Unicode and code pages.
Example
This procedure searches for a file that you specify. It displays a message indicating whether the file is not found in your path, is found in a library within your path, or is found in your path but not in a library.
r-rlib.p
|
Note
You can
improve the performance of an application by using the SEARCH and
LIBRARY functions for any files you want to execute that you specify
with a relative pathname. For example, if you want to execute a
procedure file several times that you specify with a relative pathname,
you can return the absolute pathname for the file using the SEARCH
and LIBRARY functions, then execute the RUN statement with that
absolute pathname, which avoids any need for the RUN statement to
search PROPATH each time.