Database Reference
In-Depth Information
JMP files
●
delimited files
●
3.2 Purpose
I will discuss the syntax of the SAS IMPORT procedure and point you to the SAS online documentation for
your version of SAS in this chapter. There will be several examples to show you how to write the code to use
PROC IMPORT and the results that the examples produce. Because not everyone has the latest version of either
SAS or Excel installed on his or her computer, I will not restrict my examples to those newest versions. This
chapter will show you how to write SAS code to use PROC IMPORT. Because of the size and complexity of
some of the reference tables I suggest that you refer to
SAS/ACCESS Interface to PC Files: Reference
for the
version of SAS that you have installed.
3.3 Syntax of the SAS IMPORT Procedure
PROC IMPORT
DATAFILE=
<
'filename'
>
| DATATABLE=
<
'tablename'
> (Not used for Microsoft Excel files)
<
DBMS
>
=
<
data
-
source
-
identifier
>
<OUT>=
<
libref
.
SAS data-set-name
>
<
SAS data-set-option(s)
>
<REPLACE>;
<
file-format-specific-statements
>;
NOTE:
Some features relating to Microsoft Excel 2007, 2010, and 2013 for operating systems Microsoft Vista
64 bit, Microsoft Windows 7 and 8, LINUX, and UNIX, may not be available in SAS versions prior to the third
maintenance release of SAS 9.2. Other operating systems may not be compatible until later versions of SAS are
released. SAS is not supported on some versions of the Microsoft Windows operating system.
Table 3.3.1 provides a high-level definition of the parts of the syntax for PROC IMPORT as listed above. See
SAS/ACCESS to PC Files: Reference for more details about PROC EXPORT in the SAS software version you
are using.
Table 3.3.1: General Description of PROC IMPORT Syntax Options.
Argument / (Alias)
Required
Definition of the Function of the Argument
OUTFILE/(FILE)
Yes
Provide the output file name. DATATABLE
is not used for Excel files.
SAS Data Set Options
No
Options like KEEP=, DROP=, RENAME=,
WHERE=, and others may be provided.
OUT=
Yes
Provide the output SAS dataset name.
DBMS
No
See Tables below for specific options relating
to the individual DBMS
<identifier> values
.
Options are based upon the file types being
processed and direct the actions of the SAS
PROC IMPORT features.
REPLACE
No
When “REPLACE” is present then SAS will
overwrite an existing output file. A new file
will be created if the requested file name does
not exist.
Search WWH ::
Custom Search