07-14-2016 01:25 PM
Does this solution requires that I name every variable? Or is the "name" in your example a dictionary lookup keyword? ie How do I get this to work on all my variables in the dataset (1743 of them).
07-14-2016 02:17 PM
"Name" and "Label" are variables in the dictionary.columns table.
Note the the Libname and Memname are all uppercase in the dictionary table. If you use Libname='Work' it fails as the libname is "WORK" in the table.
07-14-2016 05:18 PM
07-14-2016 11:34 PM - edited 07-14-2016 11:35 PM
It is not necessary that all variables in dataset should have label. This solution would print label if available.
In the below table, provide libname and table to the macro variables and rest of the code should work itself.
proc sql noprint;
select catt( name,'=',quote( catt(label,' (',name,')') ) )
into : embed_names_into_labels separated by ' '
where libname="&_libname" and memname="&_table" and not missing(label);
But above reply has a point that saying why do you need such a wide report.
data temp / view = temp;
proc print data=temp label; run;
07-17-2016 01:22 AM