<?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: Number of records in z/os flat file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Number-of-records-in-z-os-flat-file/m-p/956773#M373545</link>
    <description>&lt;P&gt;I don't think MVS stores a record count for sequential files.&amp;nbsp; You might be able to estimate if you knew the filesize and record length.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should be able to count by reading the file, you don't have to actual use any of the information you read however.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  if eof then call symputx('numrecs',_n_-1);
  infile 'my.main.frame.file' end=eof;
  input;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jan 2025 18:04:33 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2025-01-21T18:04:33Z</dc:date>
    <item>
      <title>Number of records in z/os flat file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-records-in-z-os-flat-file/m-p/956763#M373538</link>
      <description>&lt;P&gt;Is there a way to get the number of records in a z/os sequential mainframe flat file without having to read, INPUT, through all the records in the file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For Example:&lt;/P&gt;
&lt;P&gt;If I have a sequential file named&amp;nbsp; 'ABC.MYNAME.DAY01', how can I get the number of records in this file saved to a SAS variable named COUNT without having to INPUT all the records in the sequential file.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2025 16:31:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-records-in-z-os-flat-file/m-p/956763#M373538</guid>
      <dc:creator>sas01</dc:creator>
      <dc:date>2025-01-21T16:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Number of records in z/os flat file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-records-in-z-os-flat-file/m-p/956773#M373545</link>
      <description>&lt;P&gt;I don't think MVS stores a record count for sequential files.&amp;nbsp; You might be able to estimate if you knew the filesize and record length.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should be able to count by reading the file, you don't have to actual use any of the information you read however.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  if eof then call symputx('numrecs',_n_-1);
  infile 'my.main.frame.file' end=eof;
  input;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2025 18:04:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-records-in-z-os-flat-file/m-p/956773#M373545</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-01-21T18:04:33Z</dc:date>
    </item>
  </channel>
</rss>

