IBM i library definitions

The IBM® i library file system is organized with libraries as containers of objects, which includes source files and programs. The IBM i default search path (or library list) is an ordered list of libraries.

Building programs on IBM i requires the definition of IBM i libraries to identify:
  1. Libraries where source members are loaded before being compiled
  2. Libraries where compiled objects are built
  3. Libraries referenced by the build, such as vendor libraries that might not be under source control, but are needed by the build process
A library definition contains the following information:
  • The name of the library
  • An optional member name
Remember: A library definition makes no statement about the actual existence of a library on a particular build system. It is only a container for information about a library. When the library definition is combined with information from a build request, such as the target system and a resource prefix, you can create a new library with the characteristics you specify in that library definition.
The IBM i library definition is used to store a complete or partial library name, depending on the context. There are two types of library definitions:
Target libraries
Specify load libraries and object compile libraries. The value in a target library is a partial library name. The full library name is created by appending a resource prefix value to this target library definition suffix. The resource prefix can be specified in the build definition or when you submit the build.
Existing libraries
Complete library names to specify other libraries that need to be referenced in the library list.
Each IBM i Project has properties to specify a source library, and an object library, which must point to target library definitions. The source library is the target library where source is loaded from source control. The object library is the target or existing library where objects are built.
Note: You can select an existing library as the object library, but an existing library used as the object library is not supported for personal builds or promotions.