<?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: several statements in if and else part in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/several-statements-in-if-and-else-part/m-p/358435#M84220</link>
    <description>If expression then do;&lt;BR /&gt;Executable statements;&lt;BR /&gt;End;&lt;BR /&gt;Else do;&lt;BR /&gt;Executable statements;&lt;BR /&gt;End;</description>
    <pubDate>Sat, 13 May 2017 13:37:19 GMT</pubDate>
    <dc:creator>gauthamk28</dc:creator>
    <dc:date>2017-05-13T13:37:19Z</dc:date>
    <item>
      <title>several statements in if and else part</title>
      <link>https://communities.sas.com/t5/SAS-Programming/several-statements-in-if-and-else-part/m-p/358433#M84218</link>
      <description>&lt;P&gt;I did numerous google seraches but could not find an answer. What is the syntax, if I have several statements in the if and the then part of an if the statement? This is some pseudo code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;if /*	some condition */ then 
do;
	/*	statements */
end; else 
do
	/*	statements */
end;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The if part is fine but I am not sure about the then part.&lt;/P&gt;</description>
      <pubDate>Sat, 13 May 2017 13:12:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/several-statements-in-if-and-else-part/m-p/358433#M84218</guid>
      <dc:creator>csetzkorn</dc:creator>
      <dc:date>2017-05-13T13:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: several statements in if and else part</title>
      <link>https://communities.sas.com/t5/SAS-Programming/several-statements-in-if-and-else-part/m-p/358434#M84219</link>
      <description>&lt;P&gt;You're missing a semicolon after the second DO statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the examples in the documentation &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/basess/68381/HTML/default/viewer.htm#p0pcj5ajwyngron1wlsq0tet0hce.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/basess/68381/HTML/default/viewer.htm#p0pcj5ajwyngron1wlsq0tet0hce.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Google seems broken these days. Consider searching directly at either lexjansen.com, communities.sas.com or support.sas.com&lt;/P&gt;</description>
      <pubDate>Sat, 13 May 2017 13:36:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/several-statements-in-if-and-else-part/m-p/358434#M84219</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-05-13T13:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: several statements in if and else part</title>
      <link>https://communities.sas.com/t5/SAS-Programming/several-statements-in-if-and-else-part/m-p/358435#M84220</link>
      <description>If expression then do;&lt;BR /&gt;Executable statements;&lt;BR /&gt;End;&lt;BR /&gt;Else do;&lt;BR /&gt;Executable statements;&lt;BR /&gt;End;</description>
      <pubDate>Sat, 13 May 2017 13:37:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/several-statements-in-if-and-else-part/m-p/358435#M84220</guid>
      <dc:creator>gauthamk28</dc:creator>
      <dc:date>2017-05-13T13:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: several statements in if and else part</title>
      <link>https://communities.sas.com/t5/SAS-Programming/several-statements-in-if-and-else-part/m-p/358438#M84221</link>
      <description>Thanks I found the link you provided via google but it did not show what I was after (e.g. not using else if). gauthamk28 provided what I was after. Thanks anyway.</description>
      <pubDate>Sat, 13 May 2017 14:15:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/several-statements-in-if-and-else-part/m-p/358438#M84221</guid>
      <dc:creator>csetzkorn</dc:creator>
      <dc:date>2017-05-13T14:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: several statements in if and else part</title>
      <link>https://communities.sas.com/t5/SAS-Programming/several-statements-in-if-and-else-part/m-p/358439#M84222</link>
      <description>&lt;P&gt;This one has a fourth example that is interesting, I wouldn't have expected that to work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lestmtsref/69738/HTML/default/viewer.htm#n1j60arf27ll4nn1ejavv3nby4pa.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lestmtsref/69738/HTML/default/viewer.htm#n1j60arf27ll4nn1ejavv3nby4pa.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if x=0 then  
   if y ne 0 then put 'X ZERO, Y NONZERO'; 
   else put 'X ZERO, Y ZERO';
else put 'X NONZERO';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 May 2017 14:22:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/several-statements-in-if-and-else-part/m-p/358439#M84222</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-05-13T14:22:17Z</dc:date>
    </item>
  </channel>
</rss>

