<?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: Error 79-322: Expecting a THEN in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Error-79-322-Expecting-a-THEN/m-p/533061#M6132</link>
    <description>&lt;P&gt;Your case expression has no logical expression. It should look something like this:&lt;/P&gt;
&lt;PRE&gt;proc sql;
select distinct 
       Make
      , CASE (/* Logical Expression */ Type )
          WHEN 'SUV' THEN 'N'
          ELSE 'Y'
        END
   from sashelp.cars
;
quit;
&lt;/PRE&gt;
&lt;P&gt;or like this:&lt;/P&gt;
&lt;PRE&gt;proc sql;
select distinct 
       Make
      ,CASE 
         WHEN (type='SUV') THEN 'N'
         ELSE 'Y'
       END
   from sashelp.cars;
quit;
&amp;nbsp;e&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Feb 2019 20:21:45 GMT</pubDate>
    <dc:creator>SASJedi</dc:creator>
    <dc:date>2019-02-05T20:21:45Z</dc:date>
    <item>
      <title>Error 79-322: Expecting a THEN</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-79-322-Expecting-a-THEN/m-p/533040#M6128</link>
      <description>&lt;P&gt;For the case statement below, I keep getting the error in red&lt;FONT color="#000000"&gt;. Not sure where a then is missing? Please help!!!&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;70 /* Include Owner? */&lt;BR /&gt;71 (CASE&lt;BR /&gt;72 WHEN THEN 'N'&lt;BR /&gt;___&lt;BR /&gt;79&lt;BR /&gt;73 WHEN THEN 'N'&lt;BR /&gt;___&lt;BR /&gt;79&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;ERROR 79-322: Expecting a THEN.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;74 WHEN '949 IRVING' = t1.current_owner_fn THEN 'N'&lt;BR /&gt;75 WHEN 'CLAIMS INTAKE - LIBERTY MUTUAL (CL)' = t1.current_owner_fn THEN 'N'&lt;BR /&gt;76 WHEN 'CLAIMS INTAKE - LIBERTY MUTUAL (CL) SUPPORT' = t1.current_owner_fn THEN 'N'&lt;BR /&gt;77 WHEN 'GENERAL AM INBOX - LIBERTY MUTUAL (CL)' = t1.current_owner_fn THEN 'N'&lt;BR /&gt;78 WHEN 'LIBERTY MUTUAL COMMERCIAL SUBRO' = t1.current_owner_fn THEN 'N'&lt;BR /&gt;79 WHEN 'LIBERTY MUTUAL INS - COMMERCIAL CLAIMS' = t1.current_owner_fn THEN 'N'&lt;BR /&gt;80 ELSE 'Y'&lt;BR /&gt;81 END) FORMAT=$CHAR43. LABEL="Include Owner?" AS 'Include Owner?'n,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Case statement:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CASE&lt;BR /&gt;WHEN THEN 'N'&lt;BR /&gt;WHEN THEN 'N'&lt;BR /&gt;WHEN '949 IRVING' = t1.current_owner_fn THEN 'N'&lt;BR /&gt;WHEN 'CLAIMS INTAKE - LIBERTY MUTUAL (CL)' = t1.current_owner_fn THEN 'N'&lt;BR /&gt;WHEN 'CLAIMS INTAKE - LIBERTY MUTUAL (CL) SUPPORT' = t1.current_owner_fn THEN 'N'&lt;BR /&gt;WHEN 'GENERAL AM INBOX - LIBERTY MUTUAL (CL)' = t1.current_owner_fn THEN 'N'&lt;BR /&gt;WHEN 'LIBERTY MUTUAL COMMERCIAL SUBRO' = t1.current_owner_fn THEN 'N'&lt;BR /&gt;WHEN 'LIBERTY MUTUAL INS - COMMERCIAL CLAIMS' = t1.current_owner_fn THEN 'N'&lt;BR /&gt;ELSE 'Y'&lt;BR /&gt;END&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 19:36:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-79-322-Expecting-a-THEN/m-p/533040#M6128</guid>
      <dc:creator>deenap29</dc:creator>
      <dc:date>2019-02-05T19:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error 79-322: Expecting a THEN</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-79-322-Expecting-a-THEN/m-p/533061#M6132</link>
      <description>&lt;P&gt;Your case expression has no logical expression. It should look something like this:&lt;/P&gt;
&lt;PRE&gt;proc sql;
select distinct 
       Make
      , CASE (/* Logical Expression */ Type )
          WHEN 'SUV' THEN 'N'
          ELSE 'Y'
        END
   from sashelp.cars
;
quit;
&lt;/PRE&gt;
&lt;P&gt;or like this:&lt;/P&gt;
&lt;PRE&gt;proc sql;
select distinct 
       Make
      ,CASE 
         WHEN (type='SUV') THEN 'N'
         ELSE 'Y'
       END
   from sashelp.cars;
quit;
&amp;nbsp;e&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 20:21:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-79-322-Expecting-a-THEN/m-p/533061#M6132</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2019-02-05T20:21:45Z</dc:date>
    </item>
  </channel>
</rss>

