Database Reference
In-Depth Information
Depending upon what operating system and version of SAS you are using, you may be able to write to
some or all of the following formats. The details for reading these other formats are explained in the SAS
documentation.
Microsoft Access database files
Microsoft Excel workbook files
Lotus 1-2-3 spreadsheet files
Paradox files
SPSS files
Stata files
dBase files
JMP files
delimited files
2.2 Purpose
I will discuss the syntax of the PROC EXPORT 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 EXPORT 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 EXPORT. 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. In addition, the volume of the options does
not allow for an example describing each option. While every effort has been made to reproduce the
concepts accurately, the SAS documentation is the final authority.
2.3 Syntax of the SAS EXPORT Procedure
PROC EXPORT DATA=< libref. > SAS data set <( SAS data set options )>
OUTFILE=" filename " | OUTTABLE=" tablename "
<DBMS= identifier > <REPLACE> <LABEL>;
< 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 2.1 provides a high-level definition of the parts of the syntax for PROC EXPORT as listed above.
See the SAS documentation for your version of SAS for more details about PROC EXPORT in the SAS
software version you are using.
Table 2.1: General Description of PROC EXPORT Syntax Options.
Argument / (Alias)
Required
Definition of the Function of the Argument
DATA=
Yes
Provide the input SAS dataset name.
SAS Data Set
Options
No
Options like KEEP=, DROP=, RENAME=,
WHERE=, and others may be provided.
OUTFILE/(FILE)
Yes
Provide the output file name. OUTTABLE (or
TABLE) is for Microsoft Access databases only.
 
 
Search WWH ::




Custom Search