Is there a simple way to get the number of records in a file without a browse and a record count on the browse

I have learnt to determine if a file has no records, but have not been able to turn that into a process that will give a count of all records.

! Get the DataSet record
!-------------------------

IF Records(DATASETS) = 0                       !If no record
    LOC:Count   = 0
    ! Do Stuff 
ELSE
    ! Do something to get the count (number of records) goes here
END

Can some kind person point me in the right direction?

Regards
Kenn Sharples

Hi Ken,

I might be missing something but doesn’t RECORDS(filename) give you what you want?

The function Records() needs the file in question to be Open() before it can work.