<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Labeling multiple variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Labeling-multiple-variables/m-p/481569#M124594</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to label all variables to new label which will have variable name and its label.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g. Current label of AETERM is "Reported Term for the Adverse Event". I am trying to re-label it to "AETERM Reported Term for the Adverse Event".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can we do this by call execute?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jul 2018 15:56:20 GMT</pubDate>
    <dc:creator>petlove</dc:creator>
    <dc:date>2018-07-26T15:56:20Z</dc:date>
    <item>
      <title>Labeling multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Labeling-multiple-variables/m-p/481569#M124594</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to label all variables to new label which will have variable name and its label.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g. Current label of AETERM is "Reported Term for the Adverse Event". I am trying to re-label it to "AETERM Reported Term for the Adverse Event".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can we do this by call execute?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 15:56:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Labeling-multiple-variables/m-p/481569#M124594</guid>
      <dc:creator>petlove</dc:creator>
      <dc:date>2018-07-26T15:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Labeling multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Labeling-multiple-variables/m-p/481570#M124595</link>
      <description>&lt;P&gt;I think you are looking for something like in this example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/24/664.html" target="_blank"&gt;http://support.sas.com/kb/24/664.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 16:01:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Labeling-multiple-variables/m-p/481570#M124595</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-07-26T16:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Labeling multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Labeling-multiple-variables/m-p/481573#M124597</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/135083"&gt;@petlove&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to label all variables to new label which will have variable name and its label.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;e.g. Current label of AETERM is "Reported Term for the Adverse Event". I am trying to re-label it to "AETERM Reported Term for the Adverse Event".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can we do this by call execute?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes you can, use PROC DATASETS and feed the labels in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*Create label data set;
data label_data_set;
length name label $25.;
name="Sex"; label="Gender"; output;
name="height"; label="Height (in)"; output;
name="weight"; label="Weight (lbs)"; output;
run;
 
 
*Create sample dataset to apply label;
data class;
set sashelp.class;
run;
 
 
*Create macro variable that holds label statement;
proc sql noprint;
select catx("=", name, quote(trim(label)))
  into :label_list separated by " "
from label_data_set;
quit;
 
 
*Display macro variable in log;
%put &amp;amp;label_list.;
 
 
*Apply labels without recreating dataset;
proc datasets library=work;
modify class;
label &amp;amp;label_list.;
run;quit;
 
 
*Print the dataset to display new labels;
proc print data=class label noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Jul 2018 16:10:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Labeling-multiple-variables/m-p/481573#M124597</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-26T16:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: Labeling multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Labeling-multiple-variables/m-p/481581#M124600</link>
      <description>&lt;P&gt;Thank you Reeza...&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 16:24:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Labeling-multiple-variables/m-p/481581#M124600</guid>
      <dc:creator>petlove</dc:creator>
      <dc:date>2018-07-26T16:24:33Z</dc:date>
    </item>
  </channel>
</rss>

