BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
art297
Opal | Level 21

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

1 ACCEPTED SOLUTION

Accepted Solutions
Rakeon
Quartz | Level 8

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~

View solution in original post

3 REPLIES 3
slchen
Lapis Lazuli | Level 10

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~

Rakeon
Quartz | Level 8

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~

art297
Opal | Level 21

: Very much appreciated!

sas-innovate-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 758 views
  • 0 likes
  • 3 in conversation