02.05.2013 Views

SAS(R) 9.1.3 Companion for z/OS

SAS(R) 9.1.3 Companion for z/OS

SAS(R) 9.1.3 Companion for z/OS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

60 Assigning Multiple Librefs to a Single <strong>SAS</strong> Data Library Chapter 2<br />

statement or function <strong>for</strong> a data library that was allocated externally. The following<br />

in<strong>for</strong>mation describes how <strong>SAS</strong> determines which engine to use when you do not specify<br />

one. The engine that <strong>SAS</strong> selects depends on the type of library you are accessing. See<br />

“Library Implementation Types <strong>for</strong> Base and Sequential Engines” on page 40 <strong>for</strong> more<br />

in<strong>for</strong>mation on libraries.<br />

If the library that you specify corresponds to a new or empty z/<strong>OS</strong> data set, <strong>SAS</strong><br />

assigns the default engine specified by the ENGINE= system option unless a sequential<br />

engine must be used. Sequential engines are used <strong>for</strong> the following situations:<br />

3 The library data set is on a tape device, or it is a subsystem data set managed by<br />

BatchPipes.<br />

3 The DCB characteristics DSORG=PS and RECFM=U are specified <strong>for</strong> the data set.<br />

If a sequential engine is used, <strong>SAS</strong> assigns the engine specified by the SEQENGINE=<br />

system option. For empty HFS libraries, <strong>SAS</strong> assigns the engine specified by the<br />

ENGINE= system option.<br />

If the library data set has already been initialized, or, <strong>for</strong> HFS, if the library<br />

directory already contains members, <strong>SAS</strong> generally assigns the engine that has been<br />

used to process the library in the past. The following list contains details about how<br />

<strong>SAS</strong> assigns engines <strong>for</strong> the different types of libraries:<br />

direct access bound library<br />

<strong>SAS</strong> automatically assigns the V5 engine if the library data set has the DCB<br />

characteristic DSORG=DA. Otherwise, <strong>SAS</strong> reads the library header and assigns<br />

the engine that was originally used to initialize the library.<br />

sequential access bound library<br />

<strong>SAS</strong> reads the first member header record and assigns the engine that was used to<br />

write the first member of the library.<br />

HFS library<br />

<strong>SAS</strong> examines the extension of each <strong>SAS</strong> file in the library directory, because the<br />

extension indicates the engine with which the library member was created. If all<br />

of the <strong>SAS</strong> files in the directory were created with the same engine, that engine is<br />

assigned to the library. If the <strong>SAS</strong> files were created using a mix of different<br />

engines, <strong>SAS</strong> assigns the engine specified by the ENGINE= system option.<br />

hiperspace library<br />

<strong>SAS</strong> automatically assigns the V9 engine without reading the library header if the<br />

library is a permanent hiperspace library, that is, a library that is backed by a<br />

VSAM linear data set. To access a V6 hiperspace library, you must use the<br />

LIBNAME statement and explicitly specify the V6 engine.<br />

Note: Explicitly identifying the engine with the LIBNAME statement or function<br />

saves system resources. R<br />

Assigning Multiple Librefs to a Single <strong>SAS</strong> Data Library<br />

You can assign more than one libref to the same <strong>SAS</strong> data library.<br />

For example, suppose that in two different programs you used different librefs <strong>for</strong> the<br />

same data libraries. Later you develop a new program from parts of the two old<br />

programs, or you include two different programs with the %INCLUDE statement. In<br />

the new program, you could simply assign the two original librefs to each data library<br />

and proceed.<br />

Any assigned libref can be used to access the data library with the following<br />

exception: if ACCESS=READONLY was specified or implied (by DISP=SHR) <strong>for</strong> one<br />

assignment, then that libref can only be used to read the library, even though update<br />

access is available to the library through another libref.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!