<?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: Why Variable value retaining??? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Why-Variable-value-retaining/m-p/232103#M268111</link>
    <description>You could add call missing(_aescong, _aehosp, _aedisab) before your SET statement. This will set the values to null at the start of each iteration of the DATA step.</description>
    <pubDate>Wed, 28 Oct 2015 18:37:05 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2015-10-28T18:37:05Z</dc:date>
    <item>
      <title>Why Variable value retaining???</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-Variable-value-retaining/m-p/232087#M268108</link>
      <description>&lt;P&gt;Can some one please help me in identifying the issue here. When my if condition is true the value is being retained. Any input is helpful. Please find the attached files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test(keep= aeacnno aeshosp aesdisab _aescong _aeshosp _aesdisab);&lt;BR /&gt; set AE_shell ae;&lt;BR /&gt; if aeacnno eq 1 then _aescong= 'Y';&lt;BR /&gt; if aeshosp eq 1 then _aeshosp= 'Y';&lt;BR /&gt; if aesdisab eq 1 then _aesdisab= 'Y';&lt;BR /&gt; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank You.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2015 17:36:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-Variable-value-retaining/m-p/232087#M268108</guid>
      <dc:creator>thummala</dc:creator>
      <dc:date>2015-10-28T17:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Why Variable value retaining???</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-Variable-value-retaining/m-p/232093#M268109</link>
      <description>I assume the variables _aescong _aeshosp and _adsdisab exist in either work.AE_shell or work.ae? Variables that are read in on a SET statement are automatically retained.</description>
      <pubDate>Wed, 28 Oct 2015 17:59:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-Variable-value-retaining/m-p/232093#M268109</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2015-10-28T17:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why Variable value retaining???</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-Variable-value-retaining/m-p/232095#M268110</link>
      <description>Yes, that is true. _aescong _aehosp _aedisab variables exist in ae_shell and my requirement is to populate the values based on the conditional statements. &lt;BR /&gt;In general ae_shell is an empty dataset(just shell to assign variable attributes). the other dataset(ae) has observations. Any option to work it around in the same step?</description>
      <pubDate>Wed, 28 Oct 2015 18:04:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-Variable-value-retaining/m-p/232095#M268110</guid>
      <dc:creator>thummala</dc:creator>
      <dc:date>2015-10-28T18:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why Variable value retaining???</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-Variable-value-retaining/m-p/232103#M268111</link>
      <description>You could add call missing(_aescong, _aehosp, _aedisab) before your SET statement. This will set the values to null at the start of each iteration of the DATA step.</description>
      <pubDate>Wed, 28 Oct 2015 18:37:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-Variable-value-retaining/m-p/232103#M268111</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2015-10-28T18:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Why Variable value retaining???</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-Variable-value-retaining/m-p/232121#M268112</link>
      <description>&lt;P&gt;Or since it appears you are using the AE_SHELL dataset to set the variable order and attributes add the call missing to end of the step. Just add an OUTPUT statement before the call missing. &amp;nbsp;Otherwise the reference to those variables in the CALL MISSING statement before the SET statement will make them the first three variables in your dataset.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2015 20:03:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-Variable-value-retaining/m-p/232121#M268112</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-10-28T20:03:24Z</dc:date>
    </item>
  </channel>
</rss>

