SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Setting Up Your SAS Session
Referencing Files in SAS Libraries


Specifying Engines

To indicate which engine to use, you specify the engine name in the LIBNAME statement, as shown below.


General form, LIBNAME statement for files in other formats:
LIBNAME libref engine 'SAS-data-library';

where

  • libref is 1 to 8 characters long; begins with a letter or underscore; and contains only letters, numbers, or underscores.

  • engine is the name of a library engine supported under your operating environment.

  • SAS-data-library is the name of the SAS library where the file is stored. The specification of the physical name of the library differs by operating environment.


Interface Library Engines

Interface library engines support read-only access to BMDP, OSIRIS, and SPSS files. With these engines, the physical filename associated with a libref is an actual filename, not a SAS library. This is an exception to the rules concerning librefs.


Engine Description
BMDP allows read-only access to BMDP files
OSIRIS allows read-only access to OSIRIS files
SPSS allows read-only access to SPSS files


For example, the LIBNAME statement below specifies the libref Rptdata and the engine SPSS for the file G:\Myspss.dat in the Windows operating environment.
     libname rptdata spss 'g:\myspss.dat';

For more information on interface library engines, see the SAS documentation for your operating environment.


SAS/ACCESS Engines

If your site licenses SAS/ACCESS software, you can use the LIBNAME statement to access data that are stored in a DBMS file. The types of data you can access depend on your operating environment.


Relational Databases Nonrelational Files PC Files
ORACLE ADABAS Excel (.xls)
SYBASE IMS/DL-I Lotus (.wkn)
Informix CA-IDMS DBF
DB2 for OS/390 SYSTEM 2000 DIF
DB2 for UNIX and PC    
Oracle Rdb    
ODBC     
CA-OpenIngres    


For details, see the lesson Accessing Other Vendors' DBMS Data.



back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement