![]() Chapter Contents |
![]() Previous |
![]() Next |
| SAS Companion for the OpenVMS Environment |
You can use any of the following methods to assign a SAS libref:
If you assign a libref from a SAS process, that libref is valid only within that SAS process.
If you clear a libref from within a SAS process, that libref is not cleared from other SAS processes. For information about clearing librefs, see Clearing Librefs.
| Using the LIBNAME Statement |
The LIBNAME statement identifies a SAS data library to the SAS System, associates an engine with the library, allows you to specify options for the library, and assigns a libref to it. For details about LIBNAME statement syntax, see LIBNAME.
| Using the LIBNAME Function |
The LIBNAME function takes the same arguments and options as the LIBNAME statement. For more information about the LIBNAME function, see LIBNAME.
| Using the LIBASSIGN Command |
Perform the following steps to assign a libref using the LIBASSIGN command:
Name: field.
Engine: field by selecting the
default engine or another engine from the drop-down menu. Depending on the
engine that you specify, the fields in the
Library Information: area may change.
Enable at startup box to assign this libref when you invoke SAS.
Library
Information: area. Depending on the engine selected, there may or may
not be a
Path:field available
for input.
Options: field. These options can be specific
to your host or engine, including options that are specific to a SAS engine
that accesses another software vendor's relational database system.
| Using the SAS Explorer Window |
Perform the following steps to assign a libref from the SAS Explorer window:
New when the
Libraries node in the tree structure is active. The New dialog box opens.
Library, and then select [OK]. The New Library dialog
box opens.
| Multiple SAS Data Libraries in a Single Directory |
A SAS data library consists of all the SAS files in the same OpenVMS directory (or in a group of directories-see Using a Search-String Logical Name to Concatenate SAS Data Libraries) that are accessed by the same engine. If a directory contains SAS files that are accessed by different engines, then you have more than one SAS data library in the directory, and you should therefore have a different libref for each engine-directory combination. (You cannot assign the same libref to more than one engine-directory combination. The second assignment merely overrides the first assignment.)
libname one v7 '[mydir]'; libname two concur '[mydir]';
libname concat (one two);
| Multiple Librefs for a Single SAS Data Library |
The following LIBNAME statements assign the librefs MYLIB and INLIB to the same SAS data library:
libname mylib v6 '[mydir.datasets]'; libname inlib v6 '[mydir.datasets]';
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.