<?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 Add a new column with label information in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Add-a-new-column-with-label-information/m-p/625213#M184258</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to create a data set that contain information of label name for each field&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The new data set will contain&amp;nbsp; 2 fields:&lt;/P&gt;
&lt;P&gt;"Field name"&lt;/P&gt;
&lt;P&gt;"label"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data rawtbl;
input ID Sex $ height;
cards;
1 M 178 
2 M 198
3 F 156
;
Run;

data rawtbl2;
set rawtbl;
label ID='Customer ID'  Sex='Gender' height='Height';
Run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 17 Feb 2020 09:26:10 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2020-02-17T09:26:10Z</dc:date>
    <item>
      <title>Add a new column with label information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-a-new-column-with-label-information/m-p/625213#M184258</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to create a data set that contain information of label name for each field&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The new data set will contain&amp;nbsp; 2 fields:&lt;/P&gt;
&lt;P&gt;"Field name"&lt;/P&gt;
&lt;P&gt;"label"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data rawtbl;
input ID Sex $ height;
cards;
1 M 178 
2 M 198
3 F 156
;
Run;

data rawtbl2;
set rawtbl;
label ID='Customer ID'  Sex='Gender' height='Height';
Run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Feb 2020 09:26:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-a-new-column-with-label-information/m-p/625213#M184258</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2020-02-17T09:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Add a new column with label information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-a-new-column-with-label-information/m-p/625214#M184259</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Like this ?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data=rawtbl2 out=metadata (keep=name label) noprint;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
	create table metadata as
	select name, label
	from dictionary.columns
	where libname = 'WORK' and upcase(memname) = 'RAWTBL2';
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 09:35:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-a-new-column-with-label-information/m-p/625214#M184259</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-02-17T09:35:13Z</dc:date>
    </item>
  </channel>
</rss>

