Beruflich Dokumente
Kultur Dokumente
Thus… MYSASDATA and C:\SASDATA refer to the same location The physical name
of the file on the
C:\SASDATA\REPORT and MYSASDATA.REPORT hard disk is
REPORT.SAS7BDAT
Both refer to the SAS permanent data set named
SAS created a LIBRARY named WC000001 and put the data set there.
Look at your SAS Explorer (may have to go back a folder)
Yours may have a slightly different name
Double click on the file and verify that it contains the
data, then exit the viewer.
MYWORK.JAN2016
Open IMPORTEXAMPLE2.SAS
PROC IMPORT OUT= WORK.FROMXL
DATAFILE=
"C:\SASDATA\EXAMPLE.XLS"
Note XLS file type
DBMS=XLS REPLACE; specified
SHEET="Database";
GETNAMES=YES;
RUN;
For an Excel Import, it is important to
specify the sheet name.
PROC DATASETS;
CONTENTS DATA = MYSASLIB.SOMEDATA;
or
PROC DATASETS;
CONTENTS DATA = “C:/SASDATA/SOMEDATA”;
These slides are provided for you to use to teach SAS using this book. Feel free to
modify them for your own needs. Please send comments about errors in the slides
(or suggestions for improvements) to acelliott@smu.edu. Thanks.