Skip to main content

How to find out the number of records in an Indexed file

  • February 15, 2013
  • 0 replies
  • 0 views

Problem:

There are three ways to determine the number of records in an Indexed file.

Resolution:

Option 1 - The record count is at offset offset x"40" and is 8 bytes long in the Micro Focus indexed file formats 3,4 and 8, which contains the index.  Micro Focus provides a special op code h"0003" to read the header into the record buffer.  Refer to the documentation - File Handler, chapter 7.4 Operating Code.

Option 2 - The rebuild utility options -n or -f will return the number of records in the file, if the information is present.

Option 3 - Calculate the number of records in the Micro Focus ISAM file (format 0) - take the length of the file and divides by the overall record length.  This is actually one byte longer than the data record.

Old KB# 4558

#AcuCobol
#RMCOBOL
#netexpress
#ServerExpress
#COBOL