<?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: %Let Equal a value from a Table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-variables-and-column-names/m-p/768364#M244011</link>
    <description>&lt;P&gt;It's not clear what you are trying to do. Please explain further what you are trying to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Macro variables are just text strings. In the first statement, if suppose &amp;amp;CNT = 2, for example, you are creating a macro variable named NEWCOL2 which has some value ... the value depends on the value of &amp;amp;Q and &amp;amp;NUDCYCLE, but it is a text string, and this macro variable value is unrelated to any particular data set or value within a data set. The value of &amp;amp;NEWCOL2 is simply a text string, outside of a data set.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Sep 2021 19:57:42 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2021-09-17T19:57:42Z</dc:date>
    <item>
      <title>Macro variables and column names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variables-and-column-names/m-p/768354#M244010</link>
      <description>&lt;P&gt;What if the %LET = a column name, but it doesn't define a specific row of dat? What value does it receive?&lt;BR /&gt;I'm not a SAS programmer, just trying to read it and convert it to SQL. The routine creates a table of values and does this:&lt;BR /&gt;PROC SORT DATA=CURNSN&amp;amp;cnt; BY IINSGM; RUN;&lt;BR /&gt;%LET newcol&amp;amp;cnt=IAC_&amp;amp;Q._&amp;amp;NUDCYCLE;&lt;BR /&gt;%LET nicd&amp;amp;cnt=NEWITMCD_&amp;amp;Q._&amp;amp;NUDCYCLE;&lt;BR /&gt;I have the &amp;amp;cnt value, the &amp;amp;Q value and the &amp;amp;NUDCYCLE value. Both LET values correspond to a column. Which row will provide the value? I'm guessing the last, or possibly the first?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 13:25:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variables-and-column-names/m-p/768354#M244010</guid>
      <dc:creator>bnsmithjr</dc:creator>
      <dc:date>2021-09-22T13:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: %Let Equal a value from a Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variables-and-column-names/m-p/768364#M244011</link>
      <description>&lt;P&gt;It's not clear what you are trying to do. Please explain further what you are trying to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Macro variables are just text strings. In the first statement, if suppose &amp;amp;CNT = 2, for example, you are creating a macro variable named NEWCOL2 which has some value ... the value depends on the value of &amp;amp;Q and &amp;amp;NUDCYCLE, but it is a text string, and this macro variable value is unrelated to any particular data set or value within a data set. The value of &amp;amp;NEWCOL2 is simply a text string, outside of a data set.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 19:57:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variables-and-column-names/m-p/768364#M244011</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-09-17T19:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: %Let Equal a value from a Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variables-and-column-names/m-p/769109#M244012</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15202"&gt;@Florent&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The discussion forum&amp;nbsp;&lt;STRONG&gt;SAS Macro Facility, Data Step and SAS Language Elements&amp;nbsp;&lt;/STRONG&gt;sounds interesting, but I haven't been able to find it anywhere in communities.sas.com. May I ask for directions to get there?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 11:33:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variables-and-column-names/m-p/769109#M244012</guid>
      <dc:creator>ErikLund_Jensen</dc:creator>
      <dc:date>2021-09-22T11:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: %Let Equal a value from a Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variables-and-column-names/m-p/769162#M244013</link>
      <description>&lt;P&gt;That forum existed in 2009, when this thread was started, but it has been merged into the SAS Programming community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I understand that you are a new community member, so welcome! Here's a tip: Rather than add to a thread from 12 years ago, I encourage you to create a new thread for your question. You can link to the old post, if you think it has relevant information.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 13:22:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variables-and-column-names/m-p/769162#M244013</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-09-22T13:22:41Z</dc:date>
    </item>
  </channel>
</rss>

