1 DM 'LOG;CLEAR;OUT;CLEAR'; 2 OPTIONS THREADS=YES CPUCOUNT=1; 3 options mlogic mprint mtrace symbolgen; 4 5 data data01; 6 infile 'C:\Documents and Settings\Eric A. Suess\Desktop\Stat6250\data01.txt'; 7 input ID Location M1 M2 M3 M4 M5 M6 M7 M8; 8 run; NOTE: The infile 'C:\Documents and Settings\Eric A. Suess\Desktop\Stat6250\data01.txt' is: File Name=C:\Documents and Settings\Eric A. Suess\Desktop\Stat6250\data01.txt, RECFM=V,LRECL=256 NOTE: 3000000 records were read from the infile 'C:\Documents and Settings\Eric A. Suess\Desktop\Stat6250\data01.txt'. The minimum record length was 129. The maximum record length was 157. NOTE: The data set WORK.DATA01 has 3000000 observations and 10 variables. NOTE: DATA statement used (Total process time): real time 14.63 seconds cpu time 13.78 seconds 9 /* Compute the mean and stdev of the measurement. */ 10 proc means data=data01 n mean std maxdec=2; 11 class location; 12 title 'Mean scores for each location'; 13 var M1 - M8; 14 run; NOTE: There were 3000000 observations read from the data set WORK.DATA01. NOTE: PROCEDURE MEANS used (Total process time): real time 5.92 seconds cpu time 2.81 seconds 15 proc sort data=data01; 16 by location; 17 run; NOTE: There were 3000000 observations read from the data set WORK.DATA01. NOTE: The data set WORK.DATA01 has 3000000 observations and 10 variables. NOTE: PROCEDURE SORT used (Total process time): real time 13.49 seconds cpu time 5.26 seconds 18 proc means data=data01 n mean std maxdec=2; 19 by location; 20 title 'Mean scores for each location'; 21 var M1 - M8; 22 run; NOTE: There were 3000000 observations read from the data set WORK.DATA01. NOTE: PROCEDURE MEANS used (Total process time): real time 2.99 seconds cpu time 2.48 seconds 23 24 /* Create a new data set using the "output" subcommand. */ 25 26 proc means data=data01 noprint nway; 27 class location; 28 var M1 - M8; 29 output out=locationsum 30 n = n_measurement 31 mean = m_measurement 32 std = s_measurement 33 max = max_measurement 34 min = min_measurement; 35 run; NOTE: There were 3000000 observations read from the data set WORK.DATA01. NOTE: The data set WORK.LOCATIONSUM has 3 observations and 8 variables. NOTE: PROCEDURE MEANS used (Total process time): real time 2.48 seconds cpu time 2.48 seconds 36 37 proc print data=locationsum; 38 title 'Listing of data set locationsum'; 39 run; NOTE: There were 3 observations read from the data set WORK.LOCATIONSUM. NOTE: PROCEDURE PRINT used (Total process time): real time 0.04 seconds cpu time 0.00 seconds 40 proc contents data=data01 ; 41 run; NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.11 seconds cpu time 0.00 seconds