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
datafile.dat on a Unix system (e.g.,
Quarry), you would enter:
LIBNAME aliases the library reference (libref)
misc to the physical space (directory) ~/work.
Be aware that misc is a logical reference and thus does not
exist in a physical storage unit. If you use SAS for Windows,
use appropriate filename and pathname conventions as follows:
Note: The extension of a SAS data file depends on
the operating system and SAS release (or engine). In SAS for Windows,
extensions are, for example, .sd2 (version 6.xx) and
.sas7bdat (version 7 through 9.xx).
For more, see Getting Started with SAS for Windows and Getting Started with SAS for UNIX.
For more information about statistical and mathematical software, email the UITS Stat/Math Center, visit the center's web page, or phone 812-855-4724 (IUB) or 317-278-4740 (IUPUI). The center is located in Bloomington at 410 N. Park Avenue, and is open for consultation by appointment Monday-Friday 9am-5pm.
Last modified on September 30, 2009.







