<?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 STATEMENT in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/IF-STATEMENT/m-p/280701#M56765</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;case when substr(loan_type,1,1) &amp;lt;&amp;gt; "B"
then 'SP'
else x.repayment_strategy_for_IO_PP
end as repayment_strategy_for_IO_PP,&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;where x is the alias for the contributing dataset, set in the "from" part.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jun 2016 09:30:53 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-06-28T09:30:53Z</dc:date>
    <item>
      <title>IF STATEMENT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/IF-STATEMENT/m-p/280699#M56764</link>
      <description>&lt;P&gt;Hi I need help in writing a SAS PRC SQL Script please - &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to say -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if substr(loan_type,1,1) &amp;lt;&amp;gt; "B" then&amp;nbsp;repayment_strategy_for_IO_PP = 'SP' else&amp;nbsp;&lt;SPAN&gt;repayment_strategy_for_IO_PP = the rest of the data&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 09:25:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/IF-STATEMENT/m-p/280699#M56764</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2016-06-28T09:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: IF STATEMENT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/IF-STATEMENT/m-p/280701#M56765</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;case when substr(loan_type,1,1) &amp;lt;&amp;gt; "B"
then 'SP'
else x.repayment_strategy_for_IO_PP
end as repayment_strategy_for_IO_PP,&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;where x is the alias for the contributing dataset, set in the "from" part.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 09:30:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/IF-STATEMENT/m-p/280701#M56765</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-28T09:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: IF STATEMENT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/IF-STATEMENT/m-p/280702#M56766</link>
      <description>&lt;P&gt;I have written my code like this, but getting errors so i'm assuming I haven't written it out as you would expect?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;create table work.score_2 as &lt;BR /&gt;select&lt;BR /&gt;*,&lt;BR /&gt;case when substr(loan_type,1,1) &amp;lt;&amp;gt; "B"&lt;BR /&gt;then 'SP'&lt;BR /&gt;else repayment_strategy_for_IO_PP&lt;BR /&gt;end as repayment_strategy_for_IO_PP,&lt;BR /&gt;from work.score_1;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 09:36:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/IF-STATEMENT/m-p/280702#M56766</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2016-06-28T09:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: IF STATEMENT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/IF-STATEMENT/m-p/280703#M56767</link>
      <description>&lt;P&gt;I believe that &amp;lt;&amp;gt; has different meaning in SQL vs. a DATA step. &amp;nbsp;What are you picturing that &amp;lt;&amp;gt; should mean?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 09:38:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/IF-STATEMENT/m-p/280703#M56767</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-06-28T09:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: IF STATEMENT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/IF-STATEMENT/m-p/280707#M56769</link>
      <description>&lt;P&gt;I need to make sure that if -&lt;/P&gt;
&lt;P&gt;1. Property = residential&lt;/P&gt;
&lt;P&gt;2. Repayment Method = Interest only and Part repayment&lt;/P&gt;
&lt;P&gt;3. Then repayment strategy = Sale of Mortgage Property&lt;/P&gt;
&lt;P&gt;else bring back everything else.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the variables are -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Loan_Type = 'R'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Type_of_loan IN 'R','P'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;repayment_strategy_for_IO_PP = 'SP'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But I need to make sure that if the criteria isn't hit above, that the rest of the case present as normal if that makes sense&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 09:51:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/IF-STATEMENT/m-p/280707#M56769</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2016-06-28T09:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: IF STATEMENT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/IF-STATEMENT/m-p/280746#M56783</link>
      <description>&lt;P&gt;Your log would have the error right before FROM.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remove the &amp;nbsp;comma before the keyword FROM.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 12:41:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/IF-STATEMENT/m-p/280746#M56783</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-28T12:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: IF STATEMENT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/IF-STATEMENT/m-p/280748#M56785</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza﻿&lt;/a&gt; once again caught it, my example was meant to not be the last part of the select list.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 12:44:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/IF-STATEMENT/m-p/280748#M56785</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-28T12:44:03Z</dc:date>
    </item>
  </channel>
</rss>

