Create a permanent SAS data file in SAS

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 (for example, 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 under UNIX guide.

If you have questions about using statistical and mathematical software at Indiana University, contact the UITS Research Applications and Deep Learning team.

This is document afdt in the Knowledge Base.
Last modified on 2023-11-20 14:37:07.