<?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 if statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/if-statement/m-p/817733#M322763</link>
    <description>&lt;PRE&gt;if block_code_1 ne '' and date_block_code_1&amp;gt; "&amp;amp;SAMPDATE"d then block_code_1='';
if block_code_2 ne '' and date_block_code_2&amp;gt; "&amp;amp;SAMPDATE"d then block_code_2='';
if DATE_CARD_OPENED &amp;lt;= "&amp;amp;SAMPDATE"D;
if HKBCBS_RL_STATUS='' then HKBCBS_RL_STATUS='0';
if block_code_1='A' and date_block_code_1&amp;lt;="&amp;amp;SAMPDATE"d then do;
ind_default=1;
bad_status='CHARGEOFF';
*date_default=coalesce(date_block_code_1, date_block_code_2);
date_default=date_block_code_1;
end;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;In the above piece of code, what I dont get is the third line&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if DATE_CARD_OPENED &amp;lt;= "&amp;amp;SAMPDATE"D;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;an if statement without then, what does it mean? does it mean the next if then statement on the fourth line only come true when it fulfil the third if statement?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jun 2022 10:04:16 GMT</pubDate>
    <dc:creator>HeatherNewton</dc:creator>
    <dc:date>2022-06-13T10:04:16Z</dc:date>
    <item>
      <title>if statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-statement/m-p/817733#M322763</link>
      <description>&lt;PRE&gt;if block_code_1 ne '' and date_block_code_1&amp;gt; "&amp;amp;SAMPDATE"d then block_code_1='';
if block_code_2 ne '' and date_block_code_2&amp;gt; "&amp;amp;SAMPDATE"d then block_code_2='';
if DATE_CARD_OPENED &amp;lt;= "&amp;amp;SAMPDATE"D;
if HKBCBS_RL_STATUS='' then HKBCBS_RL_STATUS='0';
if block_code_1='A' and date_block_code_1&amp;lt;="&amp;amp;SAMPDATE"d then do;
ind_default=1;
bad_status='CHARGEOFF';
*date_default=coalesce(date_block_code_1, date_block_code_2);
date_default=date_block_code_1;
end;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;In the above piece of code, what I dont get is the third line&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if DATE_CARD_OPENED &amp;lt;= "&amp;amp;SAMPDATE"D;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;an if statement without then, what does it mean? does it mean the next if then statement on the fourth line only come true when it fulfil the third if statement?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 10:04:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-statement/m-p/817733#M322763</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2022-06-13T10:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: if statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-statement/m-p/817738#M322767</link>
      <description>&lt;P&gt;IF statements, with no THEN following, cause the statement to include or exclude observations from the data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if DATE_CARD_OPENED &amp;lt;= "&amp;amp;SAMPDATE"D;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;includes observations where DATE_CARD_OPENED is less than or equal to that date in &amp;amp;SAMPDATE, and excludes observations where DATE_CARD_OPENED is greater than &amp;amp;SAMPDATE&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 10:16:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-statement/m-p/817738#M322767</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-06-13T10:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: if statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-statement/m-p/817740#M322769</link>
      <description>&lt;P&gt;It's usually called a subsetting if.&lt;/P&gt;
&lt;P&gt;It means that the following lines of code isn't executed for observations that doesn't meet the criteria, including any potential implicit OUTPUT at the end of the data step.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 10:18:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-statement/m-p/817740#M322769</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2022-06-13T10:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: if statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-statement/m-p/817741#M322770</link>
      <description>&lt;P&gt;no it's subsetting. you may read about it in the documentation.&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsref/p1cxl8ifdt8u0gn12wqbji8o5fq1.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsref/p1cxl8ifdt8u0gn12wqbji8o5fq1.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 10:21:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-statement/m-p/817741#M322770</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2022-06-13T10:21:06Z</dc:date>
    </item>
  </channel>
</rss>

