<?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 ERROR: An unexpected semicolon occurred in the %DO statement. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-An-unexpected-semicolon-occurred-in-the-DO-statement/m-p/251134#M47385</link>
    <description>&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;Can anyone help with the above error when running this small section of code below?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%macro start;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;i_creative.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%do&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; data &amp;amp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;tmp_filelist.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; length filename $&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;150&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%end&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%else&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;i_creative.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%do&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; proc append base=&amp;amp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;tmp_filelist.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; data=&amp;amp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;tmp_filelist2.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; force;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%end&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;%mend start&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Feb 2016 14:29:12 GMT</pubDate>
    <dc:creator>kimdukes77</dc:creator>
    <dc:date>2016-02-19T14:29:12Z</dc:date>
    <item>
      <title>ERROR: An unexpected semicolon occurred in the %DO statement.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-An-unexpected-semicolon-occurred-in-the-DO-statement/m-p/251134#M47385</link>
      <description>&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;Can anyone help with the above error when running this small section of code below?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%macro start;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;i_creative.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%do&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; data &amp;amp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;tmp_filelist.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; length filename $&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;150&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%end&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%else&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;i_creative.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%do&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; proc append base=&amp;amp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;tmp_filelist.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; data=&amp;amp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;tmp_filelist2.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; force;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%end&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;%mend start&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 14:29:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-An-unexpected-semicolon-occurred-in-the-DO-statement/m-p/251134#M47385</guid>
      <dc:creator>kimdukes77</dc:creator>
      <dc:date>2016-02-19T14:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: An unexpected semicolon occurred in the %DO statement.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-An-unexpected-semicolon-occurred-in-the-DO-statement/m-p/251139#M47387</link>
      <description>&lt;P&gt;You are missing semicolons to end the macro %do statements:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro start;
%if &amp;amp;i_creative. = 1 %then %do;
data &amp;amp;tmp_filelist.;
length filename $150;
run;
%end;
%else %if &amp;amp;i_creative. &amp;gt;1 %then %do;
proc append base=&amp;amp;tmp_filelist. data=&amp;amp;tmp_filelist2. force;
run;
%end;
%mend start;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Feb 2016 14:34:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-An-unexpected-semicolon-occurred-in-the-DO-statement/m-p/251139#M47387</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-02-19T14:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: An unexpected semicolon occurred in the %DO statement.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-An-unexpected-semicolon-occurred-in-the-DO-statement/m-p/251140#M47388</link>
      <description>&lt;P&gt;You need to add a semicolon&amp;nbsp;after the word&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%DO;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In both lines where it appears.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 14:36:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-An-unexpected-semicolon-occurred-in-the-DO-statement/m-p/251140#M47388</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2016-02-19T14:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: An unexpected semicolon occurred in the %DO statement.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-An-unexpected-semicolon-occurred-in-the-DO-statement/m-p/251143#M47389</link>
      <description>&lt;P&gt;Ah yes of course - such a schoolgirl error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Curse SAS with it's misleading error messages!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 14:40:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-An-unexpected-semicolon-occurred-in-the-DO-statement/m-p/251143#M47389</guid>
      <dc:creator>kimdukes77</dc:creator>
      <dc:date>2016-02-19T14:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: An unexpected semicolon occurred in the %DO statement.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-An-unexpected-semicolon-occurred-in-the-DO-statement/m-p/251160#M47397</link>
      <description>&lt;P&gt;Just a note that you don't need that piece of code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC APPEND doesn't require the base data set to preexist, so you only need the last section.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 15:32:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-An-unexpected-semicolon-occurred-in-the-DO-statement/m-p/251160#M47397</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-19T15:32:30Z</dc:date>
    </item>
  </channel>
</rss>

