data have;
set sashelp.class;
run;
proc sql noprint;
select cats(name,'="(',varnum,')"'),catx(' ','("',name,'"',name,')')
into :labels separated by ' ',:headers separated by ' '
from dictionary.columns
where libname='WORK' and memname='HAVE';
quit;
ods rtf file='c:\temp\temp.rtf' style=minimal;
proc report data=have nowd;
label &labels.;
column &headers.;
run;
ods rtf close;
... View more