In SAS, how do I create a permanent SAS data file?

A SAS data file is a type of SAS-formatted data set that stores data values and descriptor information in an external file. To create a SAS data file, you must define a SAS data library (an alias of a collection of one or more SAS data sets referenced and stored as a unit in SAS) using the LIBNAME statement.

As an example, to create a SAS data file from a raw data file (e.g., datafile.dat) on a Unix system, you would enter:

  LIBNAME misc '~/work';
  DATA misc.job1;
     INFILE datafile.dat;
     INPUT var1 var2 var3; 

LIBNAME aliases the library reference (libref) misc to the physical space (directory) ~/work. Be aware that misc is a logical reference and therefore does not exist in a physical storage unit.

For more, see the UITS Research Technologies Getting Started with SAS for Unix guide.

If you have questions about using statistical and mathematical software at Indiana University, contact Research Analytics. Research Analytics is located on the IU Bloomington campus at Woodburn Hall 200; staff are available for consultation Monday-Friday 9am-noon and by appointment.

For details about availability of UITS services during winter break, see UITS winter break support hours.

This is document afdt in the Knowledge Base.
Last modified on 2018-07-26 17:44:44.

Contact us

For help or to comment, email the UITS Support Center.