DM 'LOG;CLEAR;OUT;CLEAR'; OPTIONS THREADS=YES CPUCOUNT=2; options mlogic mprint mtrace symbolgen; data data01; infile 'D:\SAS Simulated Data\data01\data01.txt'; input ID Location M1 M2 M3 M4 M5 M6 M7 M8; run; /* Compute the mean and stdev of the measurement. */ proc means data=data01 n mean std maxdec=2; class location; title 'Mean scores for each location'; var M1 - M8; run; proc sort data=data01; by location; run; proc means data=data01 n mean std maxdec=2; by location; title 'Mean scores for each location'; var M1 - M8; run; /* Create a new data set using the "output" subcommand. */ proc means data=data01 noprint nway; class location; var M1 - M8; output out=locationsum n = n_measurement mean = m_measurement std = s_measurement max = max_measurement min = min_measurement; run; proc print data=locationsum; title 'Listing of data set locationsum'; run; proc contents data=data01 ; run;