Hi: You'd have to read the raw data into a SAS dataset in order to use PROC REPORT. Or, you'd have to read the RAW data in a DATA step program and then use PUT statements to create the output table. Either way, SAS is not dealing with the raw data directly. As an example, here's a DATA step program that reads raw data that has been constructed as described earlier in this post and then the same PROC REPORT code can be used on the file. I just used a DATALINES section to feed "instream" data to the program, but your INFILE statement could have been:
infile 'c:\temp\rawdata.txt' dlm=',' dsd;
...instead of having a DATALINES for the data.
Cynthia
data means;
length c1 $10 c2 $5 variable $32 stat $30;
infile datalines dlm=',' dsd;
input c1 $ c2 $ Variable $ stat $ ;
return;
datalines;
Female,Old,x1,"60.4 (13.4)"
Female,Young,x1,"64.1 (13.0)"
Male,Old,x1,"59.1 (14.2)"
Male,Young,x1,"52.1 (16.1)"
Female,Old,x2,"3.0 (1.0)"
Female,Young,x2,"2.9 (0.8)"
Male,Old,x2,"3.0 (1.1)"
Male,Young,x2,"2.6 (0.8)"
;
run;
proc report data=means nowd;
column ('Variable' variable) c1, c2, stat n;
define variable / group '';
define c1 / across '';
define c2 / across '';
define stat / '';
define n / noprint;
run;
... View more