You must list all data
libraries that are nested in a concatenated library in DATALIBS.
Single-level nested
data libraries work properly regardless of the order of the libraries
in the DATALIBS statement. For example,
PROC APPSRV;
ALLOC LIBRARY ONE '/path/one';
ALLOC LIBRARY TWO ('/path/two' ONE);
DATALIBS ONE TWO;
works whether the order of the
libraries is coded as
DATALIBS ONE TWO
or
DATALIBS TWO ONE
.
Multilevel nested libraries
work only if the order in the DATALIBS statement is correct. The following
code does not work because library THREE is assigned before library
TWO:
PROC APPSRV;
ALLOC LIBRARY ONE '/path/one';
ALLOC LIBRARY TWO ('/path/two' ONE);
ALLOC LIBRARY THREE ('/path/three' TWO);
DATALIBS THREE TWO ONE;
Instead, use the following
code:
DATALIBS ONE TWO THREE; /* or DATALIBS TWO ONE THREE; */
ALLOC statements are
order dependent. PROC APPSRV performs an automatic check on library
and file assignments during its start-up phase. The code
PROC APPSRV;
ALLOC LIBRARY TWO ('/path/two' ONE);
ALLOC LIBRARY ONE '/path/one';
fails because library
ONE is not defined when the library TWO assignment is tested. This
happens regardless of how the libraries are listed in the DATALIBS,
PROGLIBS, or ADMINLIBS statements. Remember that the syntax is identical
to that of a LIBNAME statement in SAS open code.
Every library that is
used must be defined as a data library. The following code does not
work because library ONE is not defined as a data library:
PROC APPSRV;
ALLOC LIBRARY ONE '/path/one';
ALLOC LIBRARY TWO ('/path/two' ONE);
DATALIBS TWO;