How to export data from SAS using PROC EXPORT

shreyansh

Member
Staff member
PROC EXPORT is used to export SAS datasets into external files in other multiple formats.

Here is the syntax of PROC EXPORT:
proc export data=sas-dataset-name
outfile='/path/to/output/filename_intellectsage.csv'
dbms=csv
replace;
run;

Description of PROC EXPORT Syntax

data=sas-dataset-name: This is name of SAS dataset you intend to export.
outfile: Here is file location in which you want to save the file.
dbms: This is file format to apply when exporting the file. replace: Replaces exported file if it already exists. It is an optional argument.

You can use the following DBMS options to export data to different file formats:

Specify dbms=XLSX to export data as an Excel file.
Specify dbms=CSV to export data as a CSV file.
Specify dbms=TAB to export data as a Text file.
Specify dbms=SAV to export data as a SPSS file.
Specify dbms=DTA to export data as a Stata file.
Specify dbms=ACCESSCS to export data as a MS Access file.
 
Back
Top