<?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 &amp; symget in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/let-symget/m-p/98394#M20777</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Question 1:&amp;nbsp; In general, %LET will not appear within a DATA step unless the logic is faulty.&amp;nbsp; As Tom mentioned, if you want the DATA step to assign a value to a macro variable, use CALL SYMPUT or CALL SYMPUTX.&amp;nbsp; There might be obscure applications where you want a DATA step to execute %LET.&amp;nbsp; You can make that happen, but it is beyond what most people would ever want to do.&amp;nbsp; For example, this statement could appear within a DATA step:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if amount &amp;gt; 500 then call execute('%let color=Blue;');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When macro statements appear within CALL EXECUTE, they execute immediately.&amp;nbsp; Given the questions you started out asking, though, I suspect that such an obscure application is not what you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question 2:&amp;nbsp; SYMGET is a DATA step statement.&amp;nbsp; Since a macro definition can include DATA steps, those DATA steps can include SYMGET.&lt;/P&gt;&lt;P&gt;If you have an example of what you are trying to accomplish, I'm sure you'll receive plenty of suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Apr 2012 13:25:09 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2012-04-30T13:25:09Z</dc:date>
    <item>
      <title>%let &amp; symget</title>
      <link>https://communities.sas.com/t5/SAS-Programming/let-symget/m-p/98392#M20775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Can anybody help me to clarify my doubt if possible with example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1. Can we use %let statement in datastep.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.Can we use symget function in macros.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;Regards&lt;/P&gt;&lt;P&gt;Rawindarreddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2012 06:07:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/let-symget/m-p/98392#M20775</guid>
      <dc:creator>rawindar</dc:creator>
      <dc:date>2012-04-30T06:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: %let &amp; symget</title>
      <link>https://communities.sas.com/t5/SAS-Programming/let-symget/m-p/98393#M20776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please see Tom's explanation in this discussion:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.sas.com/message/119344#119344"&gt;https://communities.sas.com/message/119344#119344&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2012 11:14:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/let-symget/m-p/98393#M20776</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-04-30T11:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: %let &amp; symget</title>
      <link>https://communities.sas.com/t5/SAS-Programming/let-symget/m-p/98394#M20777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Question 1:&amp;nbsp; In general, %LET will not appear within a DATA step unless the logic is faulty.&amp;nbsp; As Tom mentioned, if you want the DATA step to assign a value to a macro variable, use CALL SYMPUT or CALL SYMPUTX.&amp;nbsp; There might be obscure applications where you want a DATA step to execute %LET.&amp;nbsp; You can make that happen, but it is beyond what most people would ever want to do.&amp;nbsp; For example, this statement could appear within a DATA step:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if amount &amp;gt; 500 then call execute('%let color=Blue;');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When macro statements appear within CALL EXECUTE, they execute immediately.&amp;nbsp; Given the questions you started out asking, though, I suspect that such an obscure application is not what you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question 2:&amp;nbsp; SYMGET is a DATA step statement.&amp;nbsp; Since a macro definition can include DATA steps, those DATA steps can include SYMGET.&lt;/P&gt;&lt;P&gt;If you have an example of what you are trying to accomplish, I'm sure you'll receive plenty of suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2012 13:25:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/let-symget/m-p/98394#M20777</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-04-30T13:25:09Z</dc:date>
    </item>
  </channel>
</rss>

