SAS Syntax Instructor Intro 092010 3
SAS Syntax Instructor Intro 092010 3
Note* the example below has the LIBNAME path that you would use if you had loaded SAS onto your
personal PC. The path that you would use when referencing an sample data file from lab computers will be
different. On Lab Computers you will need to go to Windows Explorer to find the path that leads up to the
last two subdirectories of (“\ets\Sashelp”)
(Note: I am attaching the text file for this next example “sasclass.csv,” but I have removed the email listing
for one individual who listed their personal instead of their UIC email.)
(reading a .csv text file containing a header row)
DATA WORK.students;
Length NameL $ 16 NameF $ 11 NameM $ 8 Email $ 26 ;
INFILE 'E:\sasclass.csv' DLM = ',' MISSOVER DSD FIRSTOBS=2;
informat Date mmddyy10.;
format Date mmddyy10. ;
INPUT Date NameL $ NameF $ NameM $ Email $;
RUN;
PROC PRINT Data= work.students label;
RUN;
(Note: here is the language based to the Excel file you put on your flash drive)
/* This is how to bracket text so that SAS reads it as an inert comment, rather than as a command */