O'Reilly logo

SAS 9.4 Language Reference, 6th Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Importing Data into a Table
Overview of Importing Data
Whether your data is stored in a standard file format or in your own special file format,
you can use the Import Wizard to import data into a SAS table. The types of files that
you can import depend on your operating environment.
Import a Standard File
To import a standard file, follow these steps:
1. With the Explorer window active, select File ð Import data.
The Import Wizard - Select import type window appears.
2. Select the type of file that you are importing by selecting a data source from the
Select a data source menu.
Note that Standard data source is selected by default. In this example, Microsoft
Excel Workbook is selected.
3. Click Next to continue.
4. In the Connect to MS Excel window, enter the pathname of the file that you want to
export, and then click OK.
396 Chapter 17 Managing Your Data in the SAS Windowing Environment
5. In the Import Wizard - Select table window, enter the name of the table that you want
to import.
6. Click Next to continue.
7. In the Import Wizard - Select library and member window, enter a location in which
to store the imported file.
Importing Data into a Table 397
In this example, Work is selected as the library, and Book1 is selected as the
member name.
8. Click Next to continue.
9. If you want SAS to create a file of PROC IMPORT statements for later use, then
enter the name of a file that will contain the SAS statements.
10. Click Finish to complete this task.
Import a Nonstandard File
If your data is not in standard format, you can use the External File Interface (EFI)
facility to import data. This tool enables you to define your file format and offers you a
range of format options. To use EFI, select User-defined file format in the Import Wizard
and follow the directions for describing your data file.
398 Chapter 17 Managing Your Data in the SAS Windowing Environment

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required