<?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: data step processing in sas during concatenation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/data-step-processing-in-sas-during-concatenation/m-p/306480#M65528</link>
    <description>&lt;P&gt;The values are not set to misisng, but the values ARE&amp;nbsp;set to the values read from the input data set when the SET statement executes.&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;Run this little program and see.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
  do i=1 to 3; output; end;
run;

data new ;
   put 'Before SET :' i=;
   set sample;
   put 'After SET: ' i=;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 22 Oct 2016 00:15:49 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2016-10-22T00:15:49Z</dc:date>
    <item>
      <title>data step processing in sas during concatenation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step-processing-in-sas-during-concatenation/m-p/306476#M65526</link>
      <description>&lt;DIV class="xis-termDefPair"&gt;&lt;DIV class="xis-term"&gt;Compilation phase&lt;/DIV&gt;&lt;DIV class="xis-definition"&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;SAS reads the descriptor information of each data set that is named in the SET statement and then creates a program data vector that contains all the variables from all data sets as well as variables created by the DATA step.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="xis-termDefPair"&gt;&lt;DIV class="xis-term"&gt;Execution — Step 1&lt;/DIV&gt;&lt;DIV class="xis-definition"&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;SAS reads the first observation from the first data set into the program data vector. It processes the first observation and executes other statements in the DATA step. It then writes the contents of the program data vector to the new data set.&lt;/DIV&gt;&lt;DIV class="xis-paraSimple"&gt;The SET statement does not reset the values in the program data vector to missing, except for variables whose value is calculated or assigned during the DATA step. &lt;U&gt;&lt;STRONG&gt;Variables that are created by the DATA step are set to missing at the beginning of each iteration of the DATA step. Variables that are read from a data set are not.&lt;/STRONG&gt;&lt;/U&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="xis-termDefPair"&gt;&lt;DIV class="xis-term"&gt;Execution — Step 2&lt;/DIV&gt;&lt;DIV class="xis-definition"&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;SAS continues to read one observation at a time from the first data set until it finds an end-of-file indicator. The values of the variables in the program data vector are then set to missing, and SAS begins reading observations from the second data set, and so on, until it reads all observations from all data sets.&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;&amp;nbsp;&lt;U&gt;&lt;STRONG&gt;Variables that are created by the DATA step are set to missing at the beginning of each iteration of the DATA step. Variables that are read from a data set are not.&lt;/STRONG&gt;&lt;/U&gt;&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;&lt;U&gt;&lt;STRONG&gt;then&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt;&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;&lt;STRONG&gt;my question is if the variables that are read from data set are not to set missing, how sas will reading second obeservation values?&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 21 Oct 2016 23:33:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step-processing-in-sas-during-concatenation/m-p/306476#M65526</guid>
      <dc:creator>balu_g</dc:creator>
      <dc:date>2016-10-21T23:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: data step processing in sas during concatenation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step-processing-in-sas-during-concatenation/m-p/306479#M65527</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/81451"&gt;@balu_g&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;DIV class="xis-termDefPair"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="xis-termDefPair"&gt;
&lt;DIV class="xis-definition"&gt;
&lt;DIV class="xis-paraSimpleFirst"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="xis-paraSimpleFirst"&gt;&amp;nbsp;&lt;U&gt;&lt;STRONG&gt;Variables that are created by the DATA step are set to missing at the beginning of each iteration of the DATA step. Variables that are read from a data set are not.&lt;/STRONG&gt;&lt;/U&gt;&lt;/DIV&gt;
&lt;DIV class="xis-paraSimpleFirst"&gt;&lt;U&gt;&lt;STRONG&gt;then&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt;&lt;/DIV&gt;
&lt;DIV class="xis-paraSimpleFirst"&gt;&lt;STRONG&gt;my question is if the variables that are read from data set are not to set missing, how sas will reading second obeservation values?&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV class="xis-paraSimpleFirst"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It's a straight input - the second observations are imported from the data set.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2016 00:08:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step-processing-in-sas-during-concatenation/m-p/306479#M65527</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-22T00:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: data step processing in sas during concatenation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step-processing-in-sas-during-concatenation/m-p/306480#M65528</link>
      <description>&lt;P&gt;The values are not set to misisng, but the values ARE&amp;nbsp;set to the values read from the input data set when the SET statement executes.&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;Run this little program and see.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
  do i=1 to 3; output; end;
run;

data new ;
   put 'Before SET :' i=;
   set sample;
   put 'After SET: ' i=;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2016 00:15:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step-processing-in-sas-during-concatenation/m-p/306480#M65528</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-10-22T00:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: data step processing in sas during concatenation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step-processing-in-sas-during-concatenation/m-p/306482#M65530</link>
      <description>&lt;P&gt;I think we're all saying the same thing, using different words.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the SET statement reads the second (and the third, and the fourth ...) observation from a SAS data set, the values that it reads in replace the values that were in place previously. &amp;nbsp;There is no need for the processing to re-set those variables to missing.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2016 01:14:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step-processing-in-sas-during-concatenation/m-p/306482#M65530</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-10-22T01:14:48Z</dc:date>
    </item>
  </channel>
</rss>

