Statements under OpenVMS |
Valid: | anywhere in a SAS program |
OpenVMS specifics: | valid values for engine-name; specifications for SAS-library; valid values for engine/host-option-list |
See: | LIBNAME Statement in SAS Language Reference: Dictionary |
Syntax | |
Details | |
Listing Data Library Attributes | |
See Also |
Syntax |
LIBNAME libref <engine> 'SAS-library'
|
|
|
Note: This 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 a SAS name that complies with SAS naming conventions and is used in SAS statements to point to SAS-library. This argument is required.
The libref can also be an OpenVMS logical name or a search-string logical name. For more information, see Using an OpenVMS Logical Name in the LIBNAME Statement and Using a Search-String Logical Name to Concatenate SAS Libraries.
Under OpenVMS, the only reserved librefs are those that are reserved by SAS on all operating environments. For a list of reserved librefs, see the LIBNAME statement in SAS Language Reference: Dictionary.
tells SAS which engine to use for accessing the library. For a list of valid engine names for OpenVMS, see Engines Available under OpenVMS. The engine that is associated with a libref accesses only files that were created by that engine, not other SAS files.
Note: The V5 engine is not supported in SAS 9.2.
If you do not specify an engine, then SAS uses the procedures described in How SAS Assigns an Engine When No Engine Is Specified to assign an engine for you.
is the name of the directory that contains the SAS library. You must enclose it in quotation marks. For example:
'mydisk:[mydirectory]'
You can refer to SAS libraries on a network by specifying the node name, followed by the disk and directory names:
'mynode::mydisk:[mydirectory]'
You can omit the SAS-library argument if you are merely specifying the engine for a libref or an OpenVMS logical name that you previously assigned.
If the directory that you specify does not already exist, then you must create it before you attempt to use the libref that you have assigned to it. (Under OpenVMS, the LIBNAME statement does not actually create directories.)
Use the following syntax for concatenated libraries:
LIBNAME libref ('SAS-library' '...SAS-library)'Note that librefs can be used as part of a physical name or a previously assigned libref.
The level of specification depends on your current location in the OpenVMS file structure. For example, if you want to access a directory that is located on another node in your OpenVMS network, then the file specification in the LIBNAME statement must include the node, the device, and the directory levels.
The file specification generally must not extend beyond the directory or subdirectory level (that is, it must not include a filename), because the libref/directory association that is made in the LIBNAME statement gives you access to all SAS files in the data library, not to a single file. However, this rule does not apply if you are assigning a libref for use with the XPORT, OSIRIS, or SPSS engines.
SAS-library can also be an OpenVMS logical name (or a path that contains a logical name). In this case, you would be assigning a libref to the logical name, and you would subsequently use the libref in your SAS program. For examples, see Using an OpenVMS Logical Name in the LIBNAME Statement.
Note: Directory wildcard specifications are not supported in LIBNAME statements. If you use an asterisk (*) or an ellipsis (...) in the SAS-library argument, an error message tells you that the physical name of the library is invalid.
are LIBNAME statement options that are available in all operating environments. For information about these options, see the LIBNAME statement in SAS Language Reference: Dictionary.
are one or more of the following host-specific options:
specifies how many disk blocks to allocate to a new SAS data set. For more information, see ALQ= Data Set Option: OpenVMS.
specifies the number of pages that are preallocated to a file. For more information, see ALQMULT= Data Set Option: OpenVMS.
specifies the bucket size for a new data set. For more information, see BKS= Data Set Option: OpenVMS.
specifies the number of I/O data caches used per SAS file. For more information, see CACHENUM= Data Set Option: OpenVMS.
controls the size of the I/O data cache that is allocated for a file. For more information, see CACHESIZE= Data Set Option: OpenVMS.
tells OpenVMS how many disk blocks to add when it automatically extends a SAS data set during a 'write' operation. For more information, see DEQ= Data Set Option: OpenVMS.
specifies the number of pages to extend a SAS file. For more information, see DEQMULT= Data Set Option: OpenVMS.
specifies the multibuffer count for a data set. For more information, see MBF= Data Set Option: OpenVMS.
Not every option is available with every engine. For information about which engine or host options are available with each engine, see Using SAS Engines.
All of these options correspond to a data set option of the same name and have the same effect as the data set option. However, engine or host options apply to all SAS data sets that are stored in the SAS library.
Specify as many options as you need. Separate them with a blank space.
Details |
The LIBNAME statement associates a libref with a permanent SAS library and lists the file attributes of a SAS library.
Note: The LIBNAME statement is also used to clear a libref. For complete documentation about this use, see the LIBNAME statement in SAS Language Reference: Dictionary.
You can use the LIBNAME statement to list attributes of SAS libraries by using the LIST option.
See Also |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.