bring (goods or services) into a country from abroad for sale.
Why do we need a procedure for import?
Data can be collected using a variety of instruments and stored using different applications/files
Data that is stored in other files/applications, is not readily usable by analysis procedures of SAS as it expects data to be orginzed in a specific way
To make use of the analytical capabilities of SAS software, we need the ability to convert the data collected in external sources into a format that is understandable by SAS
The procedure that does this 'conversion' is the import procedure
What does import procedure do?
The IMPORT procedure can be used to read data from an external data source and write it to a SAS data set.
What kind of files can be imported using import procedure?
Delimited files like csv files, tab or other delimited files can be imported usin proc import
Delimited files are the files in which different data components are separated by a specific delimiter character(s)
Proc import can also be used to import other files like microsoft excel or microsoft access files - this will need a separate licence for SAS\ACCESS PC files
What information do we need to provide the import procedure?
Complete path and name of the external file including file extension
The name of the output dataset into which the imported data has to be stored
The 'delimiter' character that is used in the file to separate the data components
Whether to generate the names of the variables for the data components from the first row of the external file
The row number of the external file from which the import procedure has to start reading for data
Import the data from a delimited file into a dataset named delimited
Import data from excel files
Import the data from males sheet of mydata workbook into a dataset named males
Import the data from females sheet of mydata workbook into a dataset named females
Import the data from class sheet of mydata workbook into a dataset named class