<?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 0 then set statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/If-0-then-set-statement/m-p/455017#M115048</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have came across following expression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF 0 then set abc;&lt;/P&gt;&lt;P&gt;how does this if 0 then set statement works&lt;/P&gt;&lt;P&gt;request you to explain with examples&lt;/P&gt;</description>
    <pubDate>Wed, 18 Apr 2018 03:38:16 GMT</pubDate>
    <dc:creator>V_R</dc:creator>
    <dc:date>2018-04-18T03:38:16Z</dc:date>
    <item>
      <title>If 0 then set statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-0-then-set-statement/m-p/455017#M115048</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have came across following expression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF 0 then set abc;&lt;/P&gt;&lt;P&gt;how does this if 0 then set statement works&lt;/P&gt;&lt;P&gt;request you to explain with examples&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 03:38:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-0-then-set-statement/m-p/455017#M115048</guid>
      <dc:creator>V_R</dc:creator>
      <dc:date>2018-04-18T03:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: If 0 then set statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-0-then-set-statement/m-p/455018#M115049</link>
      <description>&lt;P&gt;Well, 0 is false so the SET statement never executes.&amp;nbsp; You would get the same result by coding:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if 5=4 then set abc;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, the statement still has an effect over the results of the DATA step.&amp;nbsp; SAS executes DATA steps in two phases.&amp;nbsp; During the first phase, it looks through all the statements, checks for syntax errors, and sets up storage space for all the variables that the DATA step will process.&amp;nbsp; Just the presence of the SET statement (even if it never executes) forces SAS to define all the variables that are part of ABC.&amp;nbsp; All the variable names, lengths, types, etc. will become part of the new data set being constructed.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 03:43:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-0-then-set-statement/m-p/455018#M115049</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-04-18T03:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: If 0 then set statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-0-then-set-statement/m-p/455020#M115051</link>
      <description>&lt;P&gt;Thanks a lot for quick response&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 04:33:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-0-then-set-statement/m-p/455020#M115051</guid>
      <dc:creator>V_R</dc:creator>
      <dc:date>2018-04-18T04:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: If 0 then set statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-0-then-set-statement/m-p/455025#M115054</link>
      <description>&lt;P&gt;The "if 0 then set" logic ensures that the code&amp;nbsp;compiles (prepares variables, etc), but it never executes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's a very effective way of ensuring the structure of your target data set mimics the structure of your source data set, even if your source data set structure changes over time.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 05:16:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-0-then-set-statement/m-p/455025#M115054</guid>
      <dc:creator>AndrewHowell</dc:creator>
      <dc:date>2018-04-18T05:16:26Z</dc:date>
    </item>
  </channel>
</rss>

