<?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: need to suppress warning   Apparent symbolic reference when i use :var9999 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/need-to-suppress-warning-Apparent-symbolic-reference-when-i-use/m-p/371591#M275883</link>
    <description>&lt;P&gt;Thanks for response , when we use &lt;SPAN&gt;&amp;amp;&amp;amp;var&amp;amp;varcount; we get&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;Severe that is last value but in dataset we have 3 unique macrovaribles all these three need to store in your macro varaible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying create a macro varaible which should contain all unique values &amp;nbsp;, For example if in&amp;nbsp;&lt;SPAN&gt;var1- mild var2-moderate v3-severe but i want to use :var9999 because when there is update to my data i should not change my macro varaible to var4 etc....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your help&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jun 2017 10:00:33 GMT</pubDate>
    <dc:creator>ettinenivarma</dc:creator>
    <dc:date>2017-06-29T10:00:33Z</dc:date>
    <item>
      <title>need to suppress warning   Apparent symbolic reference when i use :var9999</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-to-suppress-warning-Apparent-symbolic-reference-when-i-use/m-p/371268#M275878</link>
      <description>&lt;P&gt;In aetox varaible i had distinct values as mild,moderate and death&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql ;&lt;BR /&gt;select distinct(AETOXGRC) into :var1-:var9999&lt;BR /&gt;from ae;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;%put &amp;amp;var1-&amp;amp;var9999;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i call we get " WARNING: Apparent symbolic reference VAR9999 not resolved." need to supress this warning is there any option in sas ,why &amp;amp;var9999 because when there update to varaible this consider with out changing&lt;BR /&gt;code&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2017 13:03:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-to-suppress-warning-Apparent-symbolic-reference-when-i-use/m-p/371268#M275878</guid>
      <dc:creator>ettinenivarma</dc:creator>
      <dc:date>2017-06-28T13:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: need to suppress warning   Apparent symbolic reference when i use :var9999</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-to-suppress-warning-Apparent-symbolic-reference-when-i-use/m-p/371273#M275879</link>
      <description>&lt;P&gt;You're getting the message when fewer than 9999 macro variables were needed to hold the result.&amp;nbsp; Worth a try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%put &amp;amp;var1-&amp;amp;&amp;amp;var&amp;amp;sqlobs;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;Update:&amp;nbsp; While I verified that this code works, your intent may be different.&amp;nbsp; It is conceivable that you are looking to write out the value of all macro variables created here.&amp;nbsp; (We really didn't discuss the intent of your program, only how to eliminate a warning.)&amp;nbsp; If that's the case, this is simple but prints extra information:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;%put _user_;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;For a cleaner version, you would need to add this code.&amp;nbsp; Assuming you are working within a macro definition so that %DO is permissible:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;%do i = 1 %to &amp;amp;sqlobs;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;&amp;nbsp;&amp;nbsp; %put var&amp;amp;i = &amp;amp;&amp;amp;var&amp;amp;i;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;%end;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2017 14:21:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-to-suppress-warning-Apparent-symbolic-reference-when-i-use/m-p/371273#M275879</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-06-28T14:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: need to suppress warning   Apparent symbolic reference when i use :var9999</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-to-suppress-warning-Apparent-symbolic-reference-when-i-use/m-p/371277#M275880</link>
      <description>&lt;P&gt;There will only be macrovars created for the distinct values. If you only have 3 distinct values in the dataset (as indicated), only three macro vars will be there after the step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2017 13:12:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-to-suppress-warning-Apparent-symbolic-reference-when-i-use/m-p/371277#M275880</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-06-28T13:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: need to suppress warning   Apparent symbolic reference when i use :var9999</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-to-suppress-warning-Apparent-symbolic-reference-when-i-use/m-p/371310#M275881</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;@Yes ur correct, but when I call macro I need to suppress warning.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2017 14:09:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-to-suppress-warning-Apparent-symbolic-reference-when-i-use/m-p/371310#M275881</guid>
      <dc:creator>ettinenivarma</dc:creator>
      <dc:date>2017-06-28T14:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: need to suppress warning   Apparent symbolic reference when i use :var9999</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-to-suppress-warning-Apparent-symbolic-reference-when-i-use/m-p/371313#M275882</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/73816"&gt;@ettinenivarma&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/208896"&gt;@yes&lt;/a&gt; ur correct, but when I call macro I need to suppress warning.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Then do not reference a variable you that you do not know exists.&lt;/P&gt;
&lt;P&gt;When you run:&lt;/P&gt;
&lt;P&gt;proc sql ;&lt;BR /&gt;select distinct(AETOXGRC) into :var1-:var9999&lt;BR /&gt;from ae;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;an automatic macro variable SQLOBS is assigned to the number of output observations in Proc SQL (or macro vars in this case).&lt;/P&gt;
&lt;P&gt;So capture that for reuse (as the sqlobs will reset for every Proc SQL call)&lt;/P&gt;
&lt;P&gt;%let varcount = &amp;amp;Sqlobs;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And instead of &amp;amp;var9999 use &amp;amp;&amp;amp;var&amp;amp;varcount;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2017 14:16:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-to-suppress-warning-Apparent-symbolic-reference-when-i-use/m-p/371313#M275882</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-06-28T14:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: need to suppress warning   Apparent symbolic reference when i use :var9999</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-to-suppress-warning-Apparent-symbolic-reference-when-i-use/m-p/371591#M275883</link>
      <description>&lt;P&gt;Thanks for response , when we use &lt;SPAN&gt;&amp;amp;&amp;amp;var&amp;amp;varcount; we get&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;Severe that is last value but in dataset we have 3 unique macrovaribles all these three need to store in your macro varaible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying create a macro varaible which should contain all unique values &amp;nbsp;, For example if in&amp;nbsp;&lt;SPAN&gt;var1- mild var2-moderate v3-severe but i want to use :var9999 because when there is update to my data i should not change my macro varaible to var4 etc....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your help&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 10:00:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-to-suppress-warning-Apparent-symbolic-reference-when-i-use/m-p/371591#M275883</guid>
      <dc:creator>ettinenivarma</dc:creator>
      <dc:date>2017-06-29T10:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: need to suppress warning   Apparent symbolic reference when i use :var9999</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-to-suppress-warning-Apparent-symbolic-reference-when-i-use/m-p/371603#M275884</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works:-&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sql ;&lt;BR /&gt;select distinct(AETOXGRC) into :var1-:var9999&lt;BR /&gt;from ae;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;%let varcount = &amp;amp;Sqlobs;&lt;/P&gt;&lt;P&gt;%put &amp;amp;&amp;amp;var&amp;amp;varcount;&lt;BR /&gt;%macro putit;&lt;BR /&gt;%do i=1 %to &amp;amp;sqlobs;&lt;BR /&gt;%put var&amp;amp;i = &amp;amp;&amp;amp;var&amp;amp;i;&lt;BR /&gt;%end;&lt;BR /&gt;%mend putit;&lt;BR /&gt;%putit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your time,The challenge will come when we call seperate (&amp;amp;var1,&amp;amp;var2...) macro varaible &amp;nbsp;for other calculation again we need to check data , i will try standize this as well... thanks alot&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 10:40:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-to-suppress-warning-Apparent-symbolic-reference-when-i-use/m-p/371603#M275884</guid>
      <dc:creator>ettinenivarma</dc:creator>
      <dc:date>2017-06-29T10:40:39Z</dc:date>
    </item>
  </channel>
</rss>

