This is the commands which tells you how many entries there are in the given index. If there is no index, it will give the number of records in the main file.
Please note that you have to maintain your index properly if you want to get a reliable result from this command. If you don't, there may even be more records in your index as there are records in the file.
Another important remark is that this command should not be used to know how many records there are if you want to access all of them. In that case you should use some code like :
dd_err=0 FIRSTrec REPeat loop IF dd_err THEN EXIT loop REMark do whatever you want with the record NEXTrec END REPeat loop
Sbasic number = COUNTrec(#indexid) Assembler CNTR indexid return long number C long DDcountrec(long indexid, long *return); errors, code, meaning itnf -7 invalid indexid (or bufferid)PROGS, Professional & Graphical Software