Chapter Contents

Previous

Next
SAS Companion for UNIX Environments

Accessing Disk-Format Data Libraries

You will probably create and access data libraries on disk more than any other type of library. The default engine and the compatibility engines allow read, write, and update access to SAS files on disk. They also support indexing and compression.

In the following example, the IN libref is assigned to a directory that contains the STATS1 data set:

libname in '/users/myid/myappl'; 
proc print data=in.stats1; 
run;

Remember, when the LIBNAME statement is issued, the SAS-data-library that it specifies must already exist. For example, if you want to create the SAS data set ORDERS in a directory, use the X statement to issue the mkdir UNIX command, and then use the LIBNAME statement to associate the libref with the directory.

x mkdir /users/publish/books; 
libname books '/users/publish/books'; 
data books.orders; 
  more SAS statements 
run;
By default, the LIBNAME statement associates the V8 engine with the directory.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.