Page 1 of 1

How to find record count of a mainframe dataset?

Posted: Wed Dec 02, 2009 9:59 pm
by akshadhak08
Hi,

I'm new to Eztrieve, can anyone please help me find record count of a mainframe dataset? If possible, please write me an eztrieve code that would help me find record counts.

Thanks,
Akshadha

Posted: Thu Dec 03, 2009 2:21 am
by MrSpock
Easier to do with SORT, and certainly much more portable. Just a thought.

Posted: Mon Apr 12, 2010 3:48 pm
by spawar4
use

WS-MASTER-CNT = RECORD-COUNT(MASTERFL)

where MASTERFL is file DD name and WS-MASTER-CNT is working storage variable.

Posted: Mon Apr 12, 2010 8:18 pm
by Anuj Dhawan
And what is RECORD-COUNT? Is it reserved word in Easytrieve?

Posted: Tue Apr 13, 2010 8:53 am
by spawar4
Yes RECORD-COUNT is a reserved word in easytrieve. you can write it dorectly as

WS-MASTER-CNT = RECORD-COUNT(MASTERFL)

Please let me know if you have any more ?s on this..

Posted: Tue Apr 13, 2010 2:44 pm
by Anuj Dhawan
Thanks, i could locate my easytrieve-documentation and that says,
RECORD-COUNT
RECORD-COUNT is a read-only four-byte binary field with zero decimal places that contains the number of logical I/O operations performed on a file.
...

Thanks...:). Hopefully it serves the purpose for the original request.