<?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: case statement in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/case-statement/m-p/350693#M63849</link>
    <description>&lt;P&gt;I would just get rid of the left parentheses that immediately follow the string 'when'. Let us know if that corrects the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Apr 2017 03:16:54 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2017-04-18T03:16:54Z</dc:date>
    <item>
      <title>case statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/case-statement/m-p/350691#M63848</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using case statements like shown below. It throws an error&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;"Incorrect syntax near the keyword 'then'."&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Can someone please help me write the correct syntax&lt;/P&gt;&lt;P&gt;Here, the Division table was used twice...&lt;/P&gt;&lt;P&gt;If its a medical student then we attribute the division value of the variable under admitting division(ACADADM)&lt;/P&gt;&lt;P&gt;If its a surgical student then we attribute the division value of the variable under performing division(ACADPERF)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CASE&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;WHEN &lt;/FONT&gt;&lt;FONT color="#808080" face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;Type &lt;/FONT&gt;&lt;FONT color="#808080" face="Consolas" size="2"&gt;in(&lt;/FONT&gt;&lt;FONT color="#ff0000" face="Consolas" size="2"&gt;'Medical'&lt;/FONT&gt;&lt;FONT color="#808080" face="Consolas" size="2"&gt;)&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Consolas" size="2"&gt;then&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; ACADADM&lt;/FONT&gt;&lt;FONT color="#808080" face="Consolas" size="2"&gt;.&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;Division&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;WHEN &lt;/FONT&gt;&lt;FONT color="#808080" face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;Type &lt;/FONT&gt;&lt;FONT color="#808080" face="Consolas" size="2"&gt;in(&lt;/FONT&gt;&lt;FONT color="#ff0000" face="Consolas" size="2"&gt;'Nonmedical'&lt;/FONT&gt;&lt;FONT color="#808080" face="Consolas" size="2"&gt;)&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Consolas" size="2"&gt;then&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; ACADPERF&lt;/FONT&gt;&lt;FONT color="#808080" face="Consolas" size="2"&gt;.&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;Division&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;Thnx a lot&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;END&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Consolas" size="2"&gt;as&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; MedType_ServiceLine&lt;/FONT&gt;&lt;FONT color="#808080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 03:05:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/case-statement/m-p/350691#M63848</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2017-04-18T03:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: case statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/case-statement/m-p/350693#M63849</link>
      <description>&lt;P&gt;I would just get rid of the left parentheses that immediately follow the string 'when'. Let us know if that corrects the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 03:16:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/case-statement/m-p/350693#M63849</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-04-18T03:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: case statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/case-statement/m-p/350708#M63851</link>
      <description>Since you are not utilising the in list you could simplify your code:&lt;BR /&gt;CASE Type&lt;BR /&gt;WHEN 'Medical' then...</description>
      <pubDate>Tue, 18 Apr 2017 05:26:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/case-statement/m-p/350708#M63851</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-04-18T05:26:45Z</dc:date>
    </item>
  </channel>
</rss>

