<?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 reset retained variables when switching concatenated files in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/reset-retained-variables-when-switching-concatenated-files/m-p/246457#M46112</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have a process in mainframe that reads multiple files concatenated under the same ddname.&lt;/P&gt;
&lt;P&gt;Is it possible to reset retained variables at the start of each file being read?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ubaldo&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jan 2016 20:45:16 GMT</pubDate>
    <dc:creator>shikoulitz</dc:creator>
    <dc:date>2016-01-27T20:45:16Z</dc:date>
    <item>
      <title>reset retained variables when switching concatenated files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/reset-retained-variables-when-switching-concatenated-files/m-p/246457#M46112</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have a process in mainframe that reads multiple files concatenated under the same ddname.&lt;/P&gt;
&lt;P&gt;Is it possible to reset retained variables at the start of each file being read?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ubaldo&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2016 20:45:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/reset-retained-variables-when-switching-concatenated-files/m-p/246457#M46112</guid>
      <dc:creator>shikoulitz</dc:creator>
      <dc:date>2016-01-27T20:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: reset retained variables when switching concatenated files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/reset-retained-variables-when-switching-concatenated-files/m-p/246463#M46115</link>
      <description>&lt;P&gt;Yes. You'll likely need to modify your infile statement. The option EOV=variable&lt;/P&gt;
&lt;P&gt;&lt;A name="a000853554" target="_blank"&gt;&lt;/A&gt;specifies a variable that SAS sets to 1 when the first record in a file in a series of concatenated files is read. The variable is set only after SAS encounters the next file. Like automatic variables, the EOV= variable is not written to the data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you add EOV=NewFile (or similar to your INFILE statement);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If NewFile then do;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;lt;statements to reset for the new file&amp;gt;&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2016 20:51:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/reset-retained-variables-when-switching-concatenated-files/m-p/246463#M46115</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-01-27T20:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: reset retained variables when switching concatenated files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/reset-retained-variables-when-switching-concatenated-files/m-p/246467#M46117</link>
      <description>&lt;P&gt;thank you, ballardw,&lt;/P&gt;
&lt;P&gt;I looked for it only into the z/OS companion manual....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks you again&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2016 20:59:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/reset-retained-variables-when-switching-concatenated-files/m-p/246467#M46117</guid>
      <dc:creator>shikoulitz</dc:creator>
      <dc:date>2016-01-27T20:59:01Z</dc:date>
    </item>
  </channel>
</rss>

