<?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 Re: adding labels in multiple sas tables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/adding-labels-in-multiple-sas-tables/m-p/364887#M275082</link>
    <description>&lt;P&gt;Yes (proc datasets) and no (macros).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=column_labels;
by table_name;
run;

data _null_;
set column_labels end=done;
by table_name;
if _n_ = 1 then call execute("proc datasets library=your_lib;");
if first.table_name then call execute("modify " !! trim(table_name) !! "; attrib ");
call execute(trim(column_name) !! " label='" !! trim(label) !!"' ");
if last.table_name then call execute("; "); * ends attrib statement;
if done then call execute("quit; run;");
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 07 Jun 2017 10:15:49 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-06-07T10:15:49Z</dc:date>
    <item>
      <title>adding labels in multiple sas tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/adding-labels-in-multiple-sas-tables/m-p/364879#M275081</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to&amp;nbsp;add labels to columns in about 100 sas tables that are in one libary.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one table with variables that contains&lt;/P&gt;&lt;P&gt;1&amp;nbsp; name of the tables&lt;/P&gt;&lt;P&gt;2 name of columns in these tables&lt;/P&gt;&lt;P&gt;3 name of labels that&amp;nbsp;I shoud add&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can i do it ? i was thinking about using proc datasets and macros.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 10:00:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/adding-labels-in-multiple-sas-tables/m-p/364879#M275081</guid>
      <dc:creator>Jedrzej</dc:creator>
      <dc:date>2017-06-07T10:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: adding labels in multiple sas tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/adding-labels-in-multiple-sas-tables/m-p/364887#M275082</link>
      <description>&lt;P&gt;Yes (proc datasets) and no (macros).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=column_labels;
by table_name;
run;

data _null_;
set column_labels end=done;
by table_name;
if _n_ = 1 then call execute("proc datasets library=your_lib;");
if first.table_name then call execute("modify " !! trim(table_name) !! "; attrib ");
call execute(trim(column_name) !! " label='" !! trim(label) !!"' ");
if last.table_name then call execute("; "); * ends attrib statement;
if done then call execute("quit; run;");
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Jun 2017 10:15:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/adding-labels-in-multiple-sas-tables/m-p/364887#M275082</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-06-07T10:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: adding labels in multiple sas tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/adding-labels-in-multiple-sas-tables/m-p/364896#M275083</link>
      <description>brilliant ! thank you !</description>
      <pubDate>Wed, 07 Jun 2017 10:42:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/adding-labels-in-multiple-sas-tables/m-p/364896#M275083</guid>
      <dc:creator>Jedrzej</dc:creator>
      <dc:date>2017-06-07T10:42:14Z</dc:date>
    </item>
  </channel>
</rss>

