Chapter Contents |
Previous |
Next |
SAS Companion for UNIX Environments |
LIBNAME libref <engine> 'SAS-data-library' <options> <engine/host-options>; |
LIBNAME libref <engine> ('library-1<,...'library-n'>) <options>; |
LIBNAME libref ('library-1'|libref- 1 ... 'library-n'|libref-n); |
LIBNAME libref CLEAR | _ALL_ CLEAR; |
LIBNAME libref LIST| _ALL_ LIST; |
The SAS System reserves some librefs for special system libraries. See Librefs Assigned by SAS for more information.
Note: When you clear a libref defined by an environment
variable, the variable remains defined, but it is no longer considered a libref.
You can still reuse it, either as a libref or a fileref. See Using Environment Variables as Librefs for more information.
The SAS System automatically clears the association between librefs and their respective data libraries at the end of your job or session. If you want to associate an existing libref with a different SAS data library during the current session, you do not have to end the session or clear the libref. The SAS System automatically reassigns the libref when you issue a LIBNAME statement for the new SAS data library.
The association between the libref and the SAS data library lasts as long as the SAS job or session, unless you use the LIBNAME statement either to clear the association or to associate the libref with another SAS data library.
Engine Names and Descriptions describes each of the engines that you can specify in the LIBNAME statement and tells what each engine expects for the SAS-data-library argument.
Engine Type | Name (alias) | Description | SAS-data-library |
---|---|---|---|
default | V8 (BASE) V7 |
enables you to create new SAS data files and access existing SAS data files that were created with Version 7 or Version 8. The V7 and V8 engines are identical. This engine enables read access to data files created with some earlier versions of SAS, but this engine is the only one that supports Version 7 and Version 8 catalogs. This engine allows for data set indexing and compression and is also documented in SAS Language Reference: Dictionary. | is the pathname of the directory containing the library. |
sequential | V8TAPE (TAPE) V7TAPE V6TAPE |
accesses SAS data files that were created in a sequential format, whether on tape or on disk. This engine requires less overhead than the default engine because sequential access is simpler than random access. This engine is also documented in SAS Language Reference: Dictionary. | is the name of the special file
(see Introduction to External Files and Devices)
that is associated with the sequential device, such as
/dev/rmt/0mn . |
compatibility | V6 | accesses any data file created by Release 6.09 through 6.12. | is the pathname of the directory containing the library. |
servers | SPDS | enables communication between a client session and a data server. You must have the Scalable Performance Data Server licensed on your client machine to use this engine. Refer to Scalable Performance Data Server User's Guide, Version 2 for more information. | is the logical LIBNAME domain name for an SPDS data library on the server machine. The name server resolves the domain name into the physical path for the library. |
MDDB | enables communication between a client session and an MDDB server. You must have SAS/MDDB Server licensed either or your client machine or on your server machine to use this engine. Refer to SAS MDDB Server Software: Administration Guide for complete information. | ||
transport | XPORT | accesses transport data sets. This engine creates machine-independent SAS transport files that can be used under all hosts running Release 6.09 or later of the SAS System. This engine is documented in Moving and Accessing SAS Files across Operating Environments. | is the pathname of either a sequential device or a disk file. |
interface | BMDP | provides read-only access to BMDP files. This engine is available only on AIX, HP-UX, and Solaris. | is the pathname of the data file. |
OSIRIS | provides read-only access to OSIRIS files. | is the pathname of the data file. | |
SPSS | provides read-only access to SPSS files | is the pathname of the data file. |
Engine/Host Options |
The LIBNAME statement accepts the FILELOCKS option:
FILELOCKS=NONE|FAIL|CONTINUE |
You can also specify any of the options supported by the SPDS engines. SPDS is the Scalable Performance Data Server. Refer to Scalable Performance Data Server User's Guide, Version 2 for a description of these options.
Omitting Engine Names From the LIBNAME Statement |
If you have specified the ENGINE= system option, SAS uses the engine name that you specified. See ENGINE for a discussion of the ENGINE= system option.
Note: The ENGINE=
system option specifies the default engine
for data libraries on disk only.
If you did not specify the ENGINE=
system option, SAS looks at the extensions of the files in the given directory
and uses these rules to determine an engine:
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.