SAS Statements under Windows |
Valid in: | anywhere in a SAS program |
Windows specifics: | Valid values for engine; specifications for SAS-data-library |
See: | LIBNAME Statement in SAS Language Reference: Dictionary |
Syntax | |
Details | |
Associating Librefs | |
Listing Data Library Attributes | |
See Also |
Syntax |
LIBNAME libref <engine>'('SAS-data-library-1' <,...'SAS-data-library-n'> ) ' <MEMLIB>, <FILELOCKWAIT>; |
LIBNAME libref _ALL_ LIST; |
LIBNAME libref _ALL_ CLEAR; |
Note: This version is a simplified version of the LIBNAME statement syntax. For the complete syntax and its explanation, see the LIBNAME statement in SAS Language Reference: Dictionary.
is any valid libref, as documented in SAS Language Reference: Dictionary.
is one of the following library engines supported under Windows:
For more information about these engines, see Multi Engine Architecture and the discussion of engines in SAS Language Reference: Dictionary.
is the physical name of a SAS library under Windows. It must be a valid Windows pathname or an environment variable that is set to a valid Windows pathname. You can concatenate several Windows directories to serve as a single SAS library. When you specify multiple libraries, use parentheses around the first and last library pathnames. For more information about concatenated SAS libraries, see Understanding How Multi-Folder SAS Libraries Are Accessed.
specifies to use extended server memory for this library. For more information about using extended memory, see Memory-Based Libraries.
specifies the number of seconds SAS will wait for a locked file to become available to another process. If the locked file is released before the number of seconds specified by n, then SAS locks the file for the current process and continues. If the file is still locked when the number of seconds has been reached, then SAS writes a "Locked File" error to the log and the DATA step fails.
Interaction: |
Specifying the FILELOCKWAIT= option
can have an adverse effect on one or more SAS/SHARE server and client sessions
that are waiting for the release of a SAS file that is locked by another process.
One or more wait conditions could lead to failed processes for a SAS/SHARE
server and clients.
To prevent the possibility of a failed SAS/SHARE process, you can set FILELOCKWAIT=0, which cancels the amount of time that a SAS/SHARE server and clients would wait for the release of a locked file. Canceling the wait time would prevent a failed process. For more information, see the FILELOCKWAITMAX= system option, and see the section about predefining a server library by using the LIBNAME statement in the SAS/SHARE User's Guide. |
Range: | 0 - 600 |
Default: | 0 |
Details |
The LIBNAME statement associates a libref with a permanent SAS library. It can also be used to list the file attributes of a SAS library. (The LIBNAME statement is also used to clear a libref. For more information, see Clearing Librefs.)
Note: The words AUX, CON, NUL, PRN, LPT1 - LPT9, and COM1 - COM9 are reserved words under Windows. Do not use them as librefs.
Use one of the following forms of the LIBNAME statement to associate a libref or an engine with a SAS library:
Syntax |
LIBNAME libref <engine> 'SAS-data-library' |
LIBNAME libref <engine> ('SAS-data-library-1' <,...'SAS-data-library-n')>; |
Use quotation marks when SAS-data-library is a physical path. Quotation marks are not needed when you concatenate librefs.
You can use the same arguments with these forms of the LIBNAME statement as shown in the LIBNAME statement syntax.
With the LIST option, you can use the LIBNAME statement to list attributes of SAS libraries. Data Library Attributes Listed by the LIBNAME Statement shows the results of the following LIBNAME statement:
libname sashelp list;
Data Library Attributes Listed by the LIBNAME Statement
5 libname sashelp list; 1 libname sashelp list; NOTE: Libref= SASHELP Scope= Kernel Levels= 27 -Level 1- Engine= V9 Physical Name= C:\Program Files\SAS\SASFoundation\9.2\nls\en\SASCFG File Name= C:\Program Files\SAS\SASFoundation\9.2\nls\en\SASCFG -Level 2- Engine= V9 Physical Name= C:\Program Files\SAS\SASFoundation\9.2\core\sashelp File Name= C:\Program Files\SAS\SASFoundation\9.2\core\sashelp . . . -Level 27- Engine= V9 Physical Name= C:\Program Files\SAS\SASFoundation\9.2\webhound\sashelp File Name= C:\Program Files\SAS\SASFoundation\9.2\webhound\sashelp 2 run;
See Also |
LIBNAME Statement in SAS Output Delivery System: User's Guide
LIBNAME Statement in SAS Language Interfaces to Metadata
LIBNAME Statement in SAS XML LIBNAME Engine: User's Guide
LIBNAME Statement in SAS/ACCESS for Relational Databases: Reference
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.