<?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: If then do syntax error in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/If-then-do-syntax-error/m-p/400717#M3588</link>
    <description>&lt;P&gt;You're missing a semicolon on the previous line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure what version of SAS you have but I get that error message directly:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;126  DATA Temp_Data;
127  X2 = X1;
128  X3 =0
129   if missing(X2) then do;
      --
      79
ERROR 79-322: Expecting a ;.

130      X2 = 5;
131      X3 = 1;
132  end;
133  run;

NOTE: The SAS System stopped processing this step because of
      errors.
WARNING: The data set WORK.TEMP_DATA may be incomplete.  When
         this step was stopped there were 0 observations and 3
         variables.
NOTE: DATA statement used (Total process time):
      real time           0.13 seconds
      cpu time            0.01 seconds

&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 03 Oct 2017 18:37:20 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-10-03T18:37:20Z</dc:date>
    <item>
      <title>If then do syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Studio/If-then-do-syntax-error/m-p/400711#M3587</link>
      <description>&lt;P&gt;I am very new to SAS. Below is the code I used for an if then do statement, but I am getting a syntax error message for the "end;" statement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA Temp_Data;&lt;/P&gt;&lt;P&gt;X2 = X1;&lt;/P&gt;&lt;P&gt;X3 =0&lt;/P&gt;&lt;P&gt;&amp;nbsp;if missing(X2) then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; X2 = 5;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; X3 = 1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error message states:&lt;/P&gt;&lt;P&gt;"ERROR 22-322: Syntax error, expecting one of the following: ..........."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;P&gt;Please advise. Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 18:31:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/If-then-do-syntax-error/m-p/400711#M3587</guid>
      <dc:creator>murad130</dc:creator>
      <dc:date>2017-10-03T18:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: If then do syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Studio/If-then-do-syntax-error/m-p/400717#M3588</link>
      <description>&lt;P&gt;You're missing a semicolon on the previous line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure what version of SAS you have but I get that error message directly:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;126  DATA Temp_Data;
127  X2 = X1;
128  X3 =0
129   if missing(X2) then do;
      --
      79
ERROR 79-322: Expecting a ;.

130      X2 = 5;
131      X3 = 1;
132  end;
133  run;

NOTE: The SAS System stopped processing this step because of
      errors.
WARNING: The data set WORK.TEMP_DATA may be incomplete.  When
         this step was stopped there were 0 observations and 3
         variables.
NOTE: DATA statement used (Total process time):
      real time           0.13 seconds
      cpu time            0.01 seconds

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Oct 2017 18:37:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/If-then-do-syntax-error/m-p/400717#M3588</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-03T18:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: If then do syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Studio/If-then-do-syntax-error/m-p/402875#M3644</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you Reeza,&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;This was very helpful!&lt;/DIV&gt;</description>
      <pubDate>Tue, 10 Oct 2017 17:38:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/If-then-do-syntax-error/m-p/402875#M3644</guid>
      <dc:creator>murad130</dc:creator>
      <dc:date>2017-10-10T17:38:31Z</dc:date>
    </item>
  </channel>
</rss>

