Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Library lists

The following example illustrates how library lists are embedded into a development environment.

When several developers are working on a shared database, it is usual for data to be stored locally as well as in the central data pool. Data is then transferred to and fro by means of the borrowing mechanism.

When compiling a local variant, it is a good idea to combine central and local data in a library list, so that the exact storage location does not have to be known for each library member.

The figure below shows the central library and a local library, both of which belong to the development environment. Source members have the member type S, while include members have the type M. The result is PROGRAM with type L. With the help of library lists, PROGRAM can be updated both centrally and locally with the same make file. The library list with which PROGRAM is updated is to receive the name SYSPLAMALT-PROGRAM (library lists must begin with "SYSPLAMALT-"). If used locally, SYSPLAMALT-PROGRAM must consist of two libraries, if used centrally only of one.

  • locally: SYSPLAMALT-PROGRAM = '(LIB,$CENTRAL.LIB)'
    (first look locally, then under $CENTRAL)

  • centrally: SYSPLAMALT-PROGRAM = '($CENTRAL.LIB)'
    (look only under $CENTRAL)

Figure 11: Combining source libraries
//begin-make
//modify-make-defaults library=sysplamalt-program,-
//       from-objects-var=from
//set-dependency *l(lib,program,l), "$LOCAL.LIB od. $CENTRAL.LIB"-
//                 (*l(,source1,l),-
//                  *l(,source2,l)),'/call bind'
//set-dependency *l(,source1,l),-
//                  (*l(,source1,s),-
//                  *l(,includ1,m),-
//                  *l(,includ2,m)),-
//                  '/call compile lib=&&(from#1.lib),elem=source1'
//set-dependency *l(,source2,l),-
//                  (*l(,source2,s),-
//                  *l(,includ2,m)),-
//                  '/call compile lib=&&(from#1.lib),elem=source2'
//end-make

In the BIND and COMPILE procedures, the library list is used in two different ways. BIND uses the library list on the input side directly:

...
//include-module element=source1,library=sysplamalt-program
//include-module element=source2,library=sysplamalt-program
...

With local use, the local library then has priority over the central library.

The COMPILE procedure has a LIB parameter which is supplied with the hit library via the make S variable FROM; the compiler then works directly with this value. Include processing operates with the library list SYSPLAMALT-PROGRAM. Local includes then have priority over central ones.