<?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 Mapp values of the first variable to values of the second variable using macro variables. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Mapp-values-of-the-first-variable-to-values-of-the-second/m-p/768416#M243738</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Is it possible to automate mapping unique values of the first variable to values of the second variables using macro variables? I don't want to write %let statement for every macro variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following table:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;a&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;b&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;c&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the following result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put &amp;amp;a.;
LOG: 1
%put &amp;amp;b.;
LOG: 2
%put &amp;amp;c.;
LOG: 3&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 18 Sep 2021 11:18:18 GMT</pubDate>
    <dc:creator>Jedrek369</dc:creator>
    <dc:date>2021-09-18T11:18:18Z</dc:date>
    <item>
      <title>Mapp values of the first variable to values of the second variable using macro variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Mapp-values-of-the-first-variable-to-values-of-the-second/m-p/768416#M243738</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Is it possible to automate mapping unique values of the first variable to values of the second variables using macro variables? I don't want to write %let statement for every macro variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following table:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;a&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;b&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;c&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the following result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put &amp;amp;a.;
LOG: 1
%put &amp;amp;b.;
LOG: 2
%put &amp;amp;c.;
LOG: 3&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Sep 2021 11:18:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Mapp-values-of-the-first-variable-to-values-of-the-second/m-p/768416#M243738</guid>
      <dc:creator>Jedrek369</dc:creator>
      <dc:date>2021-09-18T11:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Mapp values of the first variable to values of the second variable using macro variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Mapp-values-of-the-first-variable-to-values-of-the-second/m-p/768418#M243739</link>
      <description>&lt;PRE&gt;data have;
input x $ y;
cards;
a 1
b 2
c 3
;

data _null_;
 set have;
 call symputx(x,y);
run;

%put _user_;&lt;/PRE&gt;</description>
      <pubDate>Sat, 18 Sep 2021 11:54:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Mapp-values-of-the-first-variable-to-values-of-the-second/m-p/768418#M243739</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-09-18T11:54:39Z</dc:date>
    </item>
  </channel>
</rss>

