/*Assign libname statements before beginning*/ /*Be sure to highlight and submit these*/ libname sasdata1 v6 "c:\temp\sasdata1"; libname v8lib v8 "c:\temp\sasdata1"; libname sasdata2 v8 "c:\temp\sasdata2"; /*Run a proc on a given data set*/ proc means data=sasdata1.fitness; run; /*Set up a default data set*/ options _last_ = sasdata1.fitness; run; proc means; run; proc print; run; proc contents; run; /*Create a temporary SAS data set from the Permanent One*/ data fitness; set sasdata1.fitness; run; /*Compare the permanent data set to the temporary one*/ proc compare base=sasdata1.fitness compare=work.fitness; run; /*Find the contents of all data sets in a folder*/ /*Note: this doesn't work for proc means, etc*/ proc contents data=sasdata1._all_; run; proc contents data=sasdata2._all_ nods; run; /*For Version 8 files, you can use the full path and file name*/ /*But you can't assign a default data set*/ proc means data="c:\temp\sasdata2\baseball.sas7bdat"; title "Using the full path in windows"; run; proc means data=sasdata2.baseball; title "Using the libname.datasetname"; run; /*Get a Graph from Proc Univariate*/ /*Note: To print the graph generated by the Histogram command, Go to File...Export as Image...Select the File type you want (e.g. bmp for bitmap), Go to the location where you wish to save it, and type the file name, e.g. c:\temp\salary_graph.bmp */ proc univariate data=sasdata2.baseball plot; var salary; histogram; run;