<?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: Macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/344995#M79329</link>
    <description>&lt;P&gt;Can you attach the SASLOG so we can see not just this macro but the steps before? This error sometimes is caused by a missing semicolon somewhere, but SAS is looking for a dataset named RUN and it doesn't find it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Agreeing with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;, writing in proper English would also help.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Mar 2017 14:32:00 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2017-03-28T14:32:00Z</dc:date>
    <item>
      <title>Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/344992#M79327</link>
      <description>&lt;P&gt;Here am creating a macro &amp;nbsp;here am creating two datasets x1 x2 from s1 s1 since i cud not access s1 &amp;nbsp;s2 directly in proc sql&lt;/P&gt;&lt;P&gt;in macro,even in this way also &amp;nbsp;i cud &amp;nbsp;nt get the correct result,am getting error &amp;nbsp; ''File WORK.RUN.DATA does not exist''&lt;/P&gt;&lt;P&gt;.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro test_(test_,s1,s2);&lt;BR /&gt;data x1;&lt;BR /&gt;set &amp;amp;s1&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data x2;&lt;BR /&gt;set &amp;amp;s2;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sql ;&lt;BR /&gt;create table &amp;amp;test_ as&lt;BR /&gt;select x1.classifications, x1.VSSTRESN as Active,&lt;BR /&gt;x2.VSSTRESN as placebo,sum(x1.VSSTRESN,x2.VSSTRESN ) as total&lt;BR /&gt;from x1,x2 where x1.classifications=x2.classifications;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;%mend;&lt;/P&gt;&lt;P&gt;even i cud nt access &amp;nbsp;the data in the following way also&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc sql ; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;create table &amp;amp;test_ as &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;select &amp;amp;s1.classifications, &amp;amp;s1.VSSTRESN as Active, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;amp;s2.VSSTRESN as placebo,sum(&amp;amp;s1.VSSTRESN,&amp;amp;s2.VSSTRESN ) as total &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from &amp;amp;s1,&amp;amp;s2 where &amp;amp;s1.classifications=&amp;amp;s1.classifications; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;quit; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%test_(test100,r1,r2);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cup u pls help me out.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 14:25:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/344992#M79327</guid>
      <dc:creator>molla</dc:creator>
      <dc:date>2017-03-28T14:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/344994#M79328</link>
      <description>&lt;P&gt;Writing in plain English might make it easier for non-native speakers to follow you.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 14:29:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/344994#M79328</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-28T14:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/344995#M79329</link>
      <description>&lt;P&gt;Can you attach the SASLOG so we can see not just this macro but the steps before? This error sometimes is caused by a missing semicolon somewhere, but SAS is looking for a dataset named RUN and it doesn't find it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Agreeing with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;, writing in proper English would also help.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 14:32:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/344995#M79329</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-03-28T14:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/344998#M79330</link>
      <description>&lt;P&gt;And from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;comment your first data step is missing a semicolon.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 14:33:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/344998#M79330</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-28T14:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/345002#M79331</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;And from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;comment your first data step is missing a semicolon.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Even though I knew that was the problem, I failed to see the missing semicolon!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 14:35:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/345002#M79331</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-03-28T14:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/345007#M79332</link>
      <description>&lt;P&gt;You have situations where you are referring to a macro variable, and attempting to append text after it.&amp;nbsp; For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;amp;s1.classifications&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's incorrect.&amp;nbsp; The dot actually delimits the name of the macro variable, so where you hope to generate:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;r1.classifications&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are actually generating:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;r1classifications&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In order to get r1.classifications, you need two dots:&amp;nbsp; one to delimit the name of the macro variable, and a second dot becomes text following the macro variable value:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;amp;s1..classifications&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 14:48:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/345007#M79332</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-03-28T14:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/345057#M79345</link>
      <description>&lt;P&gt;Try this:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro test_(test_,s1,s2);&lt;BR /&gt;data x1;&lt;BR /&gt;set &amp;amp;s1; /*semi-colon was missing*/&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;data x2;&lt;BR /&gt;set &amp;amp;s2;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc sql ;&lt;BR /&gt;create table &amp;amp;test_ as&lt;BR /&gt;select x1.classifications, &lt;BR /&gt; x1.VSSTRESN as Active,&lt;BR /&gt; x2.VSSTRESN as placebo,&lt;BR /&gt; sum(x1.VSSTRESN,x2.VSSTRESN ) as total&lt;BR /&gt;from x1,x2 &lt;BR /&gt;where x1.classifications=x2.classifications;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;%mend;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 16:14:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/345057#M79345</guid>
      <dc:creator>ccarel</dc:creator>
      <dc:date>2017-03-28T16:14:39Z</dc:date>
    </item>
  </channel>
</rss>

