Steps for Creating Analysis Files
Importing SAS Data Library
- Store SAS macro
exportlib.sas
in ~/sas/exportlib.sas
- In the project area for the current report under the
data
directory create a sascsv
subdirectory
- In the main directory for the current report create a file
exportsas.sas
containing commands like the following:
%INCLUDE "H:/sas/exportlib.sas";
libname d SASV5XPT "H:/projects/REDUCE/foo/data/export.xpt";
%exportlib(d, H:/projects/REDUCE/foo/data/sascsv);
This assumes that on Windows you have
H:
mapped to your home Linux directory.
- Under Windows use
Explorer
or My Computer
to navigate to H:/projects/REDUCE/foo/exportsas.sas
, left click on exportsas.sas
, and click on BATCH SUBMISSION
.
- After the job finishes you will see under file
exportsas.log
in the same directory as exportsas.sas
. The only error messages you should see are related to missing formats - ignore these.
- Use the
Hmisc
package function sasexport.get
to read all the .csv
files in data/sascsv