I can't test this at the moment, but need to know what the result of the following code would be:
data test;
set sashelp.class;
label height='Height in cm';
run;
proc sql noprint;
select label
into :vlabels separated by "~"
from dictionary.columns
where libname="WORK" and
memname="TEST"
;
quit;
%put &vlabels.;
I'd very much appreciate it if one of you would run that code and post the value (from your log) that appears for &vlabels.;
TIA,
Art
Hi,
I got this log:
data test;
17 set sashelp.class;
18 label height='Height in cm';
19 run;
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.TEST has 19 observations and 5 variables.
NOTE: DATA statement used:
real time 0.02 seconds
cpu time 0.01 seconds
20
21 proc sql noprint;
22 select label
23 into :vlabels separated by "~"
24 from dictionary.columns
25 where libname="WORK" and
26 memname="TEST"
27 ;
28 quit;
NOTE: PROCEDURE SQL used:
real time 0.01 seconds
cpu time 0.01 seconds
29
30 %put &vlabels.;
~~~Height in cm~
92 data test;
93 set sashelp.class;
94 label height='Height in cm';
95 run;
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.TEST has 19 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
96
97 proc sql noprint;
98 select label
99 into :vlabels separated by "~"
100 from dictionary.columns
101 where libname="WORK" and
102 memname="TEST"
103 ;
104 quit;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
105
106 %put &vlabels.;
~~~Height in cm~
Hi,
I got this log:
data test;
17 set sashelp.class;
18 label height='Height in cm';
19 run;
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.TEST has 19 observations and 5 variables.
NOTE: DATA statement used:
real time 0.02 seconds
cpu time 0.01 seconds
20
21 proc sql noprint;
22 select label
23 into :vlabels separated by "~"
24 from dictionary.columns
25 where libname="WORK" and
26 memname="TEST"
27 ;
28 quit;
NOTE: PROCEDURE SQL used:
real time 0.01 seconds
cpu time 0.01 seconds
29
30 %put &vlabels.;
~~~Height in cm~
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.