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; 
  RUN;

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 Analytics 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.

This is document afdt in the Knowledge Base.
Last modified on 2016-11-15 13:07:26.

  • Fill out this form to submit your issue to the UITS Support Center.
  • Please note that you must be affiliated with Indiana University to receive support.
  • All fields are required.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.

  • Fill out this form to submit your comment to the IU Knowledge Base.
  • If you are affiliated with Indiana University and need help with a computing problem, please use the I need help with a computing problem section above, or contact your campus Support Center.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.