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. Select Filethen selectImport 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 97/2000/2002/2003 Workbook is selected.
    Import Wizard: Select import type window
  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.
    Connect to MS Excel window
  5. In the Import Wizard - Select table window, enter the name of the table that you want to import.
    Import Wizard: Select table window
  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.
    In this example, WORK is selected as the library, and Mytable2 is selected as the member name.
    Import Wizard: Select library and member window
  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.
    Import Wizard: Create SAS statements window
  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.