Using SAS Files |
Difference in Accessing Files in Version 6 and SAS 9.2 |
To access an individual SAS file in Version 6 of SAS, you had to first assign a libref or an OpenVMS logical name to the SAS library. You could then refer to individual SAS files as libref.member (or logical-name.member), where member is the filename of the individual SAS file.
In SAS 9.2, you can still use librefs or logical names as a convenient way of referring to a SAS library in SAS programs. However, you can also fully specify individual SAS files in most SAS statements and procedures that access SAS files. If portable SAS code is an issue, then using librefs is the recommended method.
Advantages of Using Librefs Rather than OpenVMS Logical Names |
Although you can use an OpenVMS logical name to identify a SAS library to SAS, you might want to use a SAS libref instead for the following reasons:
You cannot assign an engine nor specify any engine/host options with the DCL DEFINE command. SAS uses the procedure described in How SAS Assigns an Engine When No Engine Is Specified to determine which engine to use. However, it is more efficient to specify an engine explicitly in a LIBNAME statement. Also, the following SAS engines must be specified in a LIBNAME statement because they are not assigned by default: XPORT, SPSS, OSIRIS, and REMOTE.
OpenVMS logical names are not included in the list that is produced by the LIBNAME LIST statement until after they have been used as librefs in your SAS session. (See Listing Your Current Librefs under OpenVMS.)
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.