<?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 error in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107872#M30069</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In any of these accumulation type programs you need to "prime the pump" in some way.&amp;nbsp; That is one of the advantages of using PROC APPEND as it is happy to handle the case when the BASE dataset does not already exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One way to deal with it is to add some logic to your macro.&amp;nbsp; Such as by making the inclusion of the final dataset conditional on it already existing as in the code fragment below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;data &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;intext.final_all &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; set &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt; font-style: inherit; font-family: inherit;"&gt;%if exist(intext.final_all) %then intext.final_all ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 10pt; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;intext.&amp;amp;itb_extb ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Apr 2013 22:15:27 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2013-04-15T22:15:27Z</dc:date>
    <item>
      <title>Macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107858#M30055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When I run this code I get an error&lt;/P&gt;&lt;P&gt;Apparent symbolic reference DSET not resolved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you help me overcome this??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options symbolgen mlogic;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Apr 2013 00:52:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107858#M30055</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-04-14T00:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107859#M30056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You cannot refer to the value of local macro variables (all macro parameters are local to the macro) outside of the macro.&amp;nbsp; So you cannot refer to them in the call to the macro. &lt;/P&gt;&lt;P&gt;You would be better off just copying the text twice or using another line of code in the calling program to create a macro variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%let name=&lt;SPAN style="background-color: #ffffff;"&gt;vent7w2011May&lt;/SPAN&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-family: 'courier new', courier; font-size: 10pt; line-height: 1.5em;"&gt;%ventilator(dset=&amp;amp;name, itb_extb=intext.combined&amp;amp;name);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Apr 2013 01:07:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107859#M30056</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-04-14T01:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107860#M30057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;Could you clarify this a little bit for me...&lt;/P&gt;&lt;P&gt;the dset changes for every call of the macro so I cannot put it in the %let as well??????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Apr 2013 01:39:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107860#M30057</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-04-14T01:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107861#M30058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have a list of data sets to process?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sascommunity.org/wiki/Making_Lists" title="http://www.sascommunity.org/wiki/Making_Lists"&gt;http://www.sascommunity.org/wiki/Making_Lists&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 16:48:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107861#M30058</guid>
      <dc:creator>Ron_MacroMaven</dc:creator>
      <dc:date>2013-04-15T16:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107862#M30059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thanks for the reply I think I got it..&lt;/P&gt;&lt;P&gt;But could you tell me how can I use Set statement to acheive this same thing??&lt;/P&gt;&lt;P&gt;This is inside of a macro and each time you call a macro the results I get I want to append to the previous&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc append &lt;STRONG&gt;base&lt;/STRONG&gt;=intext.final_all &lt;STRONG&gt;data&lt;/STRONG&gt;=intext.&amp;amp;itb_extb;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 16:55:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107862#M30059</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-04-15T16:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107863#M30060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;proc append &lt;SPAN style="font-style: inherit;"&gt;&lt;STRONG&gt;base&lt;/STRONG&gt;&lt;/SPAN&gt;=intext.final_all &lt;SPAN style="font-style: inherit;"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;=intext.&amp;amp;itb_extb;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Says to append the records from &lt;SPAN style="background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;intext.&amp;amp;itb_extb&lt;/STRONG&gt;&lt;/SPAN&gt; to the end of &lt;SPAN style="background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;intext.final_all&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;You can do the same with a data step like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;data &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;STRONG&gt;intext.&amp;amp;itb_extb&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp; set &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;STRONG&gt;intext.&amp;amp;itb_extb&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt; background-color: #ffffff;"&gt;&lt;STRONG&gt;intext.final_all &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt; background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 17:00:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107863#M30060</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-04-15T17:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107864#M30061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have a little confusion here&lt;/P&gt;&lt;P&gt;would it not be :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;data &lt;SPAN style="font-size: 10pt; background-color: #ffffff;"&gt;&lt;STRONG&gt;intext.final_all &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp; set &lt;SPAN style="font-size: 10pt; background-color: #ffffff;"&gt;&lt;STRONG&gt;intext.final_all&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;STRONG&gt;intext.&amp;amp;itb_extb &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; background-color: #ffffff;"&gt;run;&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; background-color: #ffffff;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 17:21:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107864#M30061</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-04-15T17:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107865#M30062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does it matter at all?either way works??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 17:45:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107865#M30062</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-04-15T17:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107866#M30063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doesn't really matter. The only difference would be order of the records in the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The disadvantage of using this method is that as the FINAL_ALL table grows this step will get slower and slower as it has to keep copy over all of the previous records.&amp;nbsp; The discussion before about placing the names into a macro variable or list of macro variables and then looping over the macro variables to generate a single SET statement that listed all of the datasets would execute faster.&amp;nbsp; But it depends on the size of the tables whether the difference is significant for your application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 17:54:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107866#M30063</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-04-15T17:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107867#M30064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But Tom&lt;/P&gt;&lt;P&gt;in the example below&lt;/P&gt;&lt;P&gt;for the first call this is OK&lt;/P&gt;&lt;P&gt;In the second call&amp;nbsp; &lt;SPAN style="background-color: #ffffff;"&gt;&lt;STRONG&gt;intext.&amp;amp;itb_extb&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt; changes and&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background-color: #ffffff;"&gt;&lt;STRONG&gt;intext.final_all&amp;nbsp; has nothing prior&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background-color: #ffffff;"&gt;&lt;STRONG&gt;So we will be having the contents of only the dataset in the second call???&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background-color: #ffffff;"&gt;&lt;STRONG&gt;Please correct me&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background-color: #ffffff;"&gt;&lt;STRONG&gt;In the end we will have only the records from the last dataset???&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;data &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;STRONG&gt;intext.&amp;amp;itb_extb&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp; set &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;STRONG&gt;intext.&amp;amp;itb_extb&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background-color: #ffffff;"&gt;&lt;STRONG&gt;intext.final_all &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; background-color: #ffffff;"&gt;run;&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; background-color: #ffffff;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 18:05:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107867#M30064</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-04-15T18:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107868#M30065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right. I reversed the BASE and DATA table names.&amp;nbsp; The order in the SET statement doesn't matter very much, but which one is specified in the DATA statement is critical.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 18:12:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107868#M30065</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-04-15T18:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107869#M30066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Tom for the clarification..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 18:14:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107869#M30066</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-04-15T18:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107870#M30067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, Instead of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;data &lt;SPAN style="font-size: 10pt; background-color: #ffffff;"&gt;&lt;STRONG&gt;intext.final_all &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp; set &lt;SPAN style="font-size: 10pt; background-color: #ffffff;"&gt;&lt;STRONG&gt;intext.final_all&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;STRONG&gt;intext.&amp;amp;itb_extb;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YOU PUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;data &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;STRONG&gt;intext.&amp;amp;itb_extb&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp; set &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;STRONG&gt;intext.&amp;amp;itb_extb&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background-color: #ffffff;"&gt;&lt;STRONG&gt;intext.final_all &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; background-color: #ffffff;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; background-color: #ffffff;"&gt;In both of these the first one is to be followed right???&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; background-color: #ffffff;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 18:23:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107870#M30067</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-04-15T18:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107871#M30068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I tried to use it and either of the cases it says:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background-color: #ffffff;"&gt;&lt;STRONG&gt;intext.final_all &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;; doesnot exist??????&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Please let me know how to deal with this???&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 18:29:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107871#M30068</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-04-15T18:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107872#M30069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In any of these accumulation type programs you need to "prime the pump" in some way.&amp;nbsp; That is one of the advantages of using PROC APPEND as it is happy to handle the case when the BASE dataset does not already exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One way to deal with it is to add some logic to your macro.&amp;nbsp; Such as by making the inclusion of the final dataset conditional on it already existing as in the code fragment below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;data &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;intext.final_all &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; set &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt; font-style: inherit; font-family: inherit;"&gt;%if exist(intext.final_all) %then intext.final_all ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 10pt; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;intext.&amp;amp;itb_extb ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 22:15:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107872#M30069</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-04-15T22:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107873#M30070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;I understansd that the below code sets&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: inherit; font-size: 10pt; font-style: inherit;"&gt;intext.final_all &lt;/SPAN&gt;&amp;nbsp; and&amp;nbsp; &lt;SPAN style="font-family: inherit; font-style: inherit;"&gt;intext.&amp;amp;itb_extb ;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;could you explain the meaning of : &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-size: 10pt; font-style: inherit; font-family: inherit;"&gt;%if exist(intext.final_all) %then intext.final_all ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-size: 10pt; font-style: inherit; font-family: inherit;"&gt;Thanks&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-style: inherit;"&gt;&lt;SPAN style="font-family: inherit; font-style: inherit;"&gt;data &lt;SPAN style="font-family: inherit; font-size: 10pt; font-style: inherit;"&gt;intext.final_all &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit; font-style: inherit;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: inherit; font-style: inherit;"&gt;&amp;nbsp; set &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: inherit; font-size: 10pt; font-style: inherit;"&gt;%if exist(intext.final_all) %then intext.final_all ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-style: inherit;"&gt;&lt;SPAN style="font-family: inherit; font-size: 10pt; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: inherit; font-style: inherit;"&gt;intext.&amp;amp;itb_extb ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-style: inherit;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Apr 2013 17:48:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107873#M30070</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-04-16T17:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107874#M30071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First there is a mistake in the code.&amp;nbsp; For it to work right as macro logic I needed to wrap the EXIST() function call in a %SYSFUNC() macro function call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%if %sysfunc(exist(intext.final_all)) %then intext.final_all ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;What that statement means is that when the dataset INTEXT.FINAL_ALL exists the macro should generate the SAS code &lt;STRONG&gt;INTEXT.FINAL_ALL&lt;/STRONG&gt;.&amp;nbsp; Since there is no %ELSE clause when the dataset does not exist then it generates no SAS code at all.&amp;nbsp; So the effect is that when the dataset exists both datasets are referenced in the SET statement and when it does not only the new data is referenced. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Apr 2013 18:19:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-error/m-p/107874#M30071</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-04-16T18:19:33Z</dc:date>
    </item>
  </channel>
</rss>

