There are many ways to create a direct access bound
library, but all methods have two points in common: First, the library
physical name must correspond to a new or empty
z/OS data set on DASD.
Second, the library data set must have the DCB attribute DSORG=PS,
and RECFM, if specified, must be FS. The second requirement is met
if a Base SAS engine is explicitly specified in the LIBNAME statement
that is used to identify the library.
The first time a new
direct access bound library is used, it is initialized with the control
structures that are necessary to manage library space and maintain
the directory of library members.
The following example
uses the LIBNAME statement with the default library options:
libname study '.study1.saslib' disp=(new,catlg);
data study.run1;
...
run;
These SAS statements
use the V9 engine to create a library named
prefix.STUDY1.SASLIB
where
prefix is the value of
the SYSPREF system option. The amount of space allocated to the library
is derived from the value of the FILEUNIT, FILESPPRI, and FILESPSEC
system options. SAS automatically sets the appropriate DCB attributes.
In an interactive session, it is possible to omit the DISP option;
in this case, SAS assumes a status of NEW and prompts for the value
of the normal disposition.
The following example
creates an external assignment using JCL:
//jobname JOB ...
// EXEC SAS
//STUDY DD DSN-USER489.STUDY1.SASLIB,DISP=(NEW,CATLG),
// UNIT=DISK,SPACE=(CYL,(200,50)),DCB=DSORG=PS
data study.run1;
...
run;
Assuming that the ENGINE
system option uses the default of V9, these SAS statements create
a library named USER489.STUDY1.SASLIB.
As in the previous example,
SAS automatically sets the appropriate DCB attributes. Note that
it is not necessary to specify the LIBNAME statement.
The following example
explicitly specifies the V6 compatibility engine:
//jobname JOB ...
// EXEC SAS
//HIST DD DSN=USER489.HISTORY1.SASLIB,DISP=(NEW,CATLG),
// UNIT=3390,SPACE=(CYL,(10,10)),
// DCB=(DSORG=PS,BLKSIZE=27648)
libname hist V6;
data hist.analysis;
...
run;
Like the previous JCL
example, this example uses external assignment. However, the V6 compatibility
engine is explicitly specified in the LIBNAME statement. This library
can now be processed by SAS Version 6. In addition, the DD statement
in the JCL explicitly specifies the library block size.