The IMPORT Procedure |
PROC IMPORT reads data from an external data source and writes it to a SAS data set. Base SAS can import delimited files. In delimited files, a delimiter--such as a blank, comma, or tab--separates columns of data values. If you license SAS/ACCESS Interface to PC Files, additional external data sources can include such files as Microsoft Access Database, Excel files, and Lotus spreadsheets. See the SAS/ACCESS Interface to PC Files for more information.
When you run the IMPORT procedure, it reads the input file and writes the data to a SAS data set. The SAS variable definitions are based on the input records. When the IMPORT procedure reads a delimited file, it generates a DATA step code to import the data.
You control the results with options and statements that are specific to the input data source. The IMPORT procedure generates the specified output SAS data set and writes information about the import to the SAS log. The log displays the DATA step code that the IMPORT procedure generates.
To import data, you can also use the Import Wizard or the External File Interface (EFI) to guide you through the steps to import an external data source. You can use the Import Wizard to generate IMPORT procedure statements, which you can save to a file for subsequent use. To open the Import Wizard or EFI from the SAS windowing environment, select File Import Data. For more information about the Import Wizard or EFI, see the Base SAS online Help and documentation.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.