How to find record count of a mainframe dataset?

Ask/Clarify the questions on EASYTRIEVE

Moderators: DikDude, Moderator Group

Post Reply
akshadhak08
Member
Posts: 1
Joined: Wed Dec 02, 2009 9:23 pm

How to find record count of a mainframe dataset?

Post by akshadhak08 » Wed Dec 02, 2009 9:59 pm

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

MrSpock
Active Member
Posts: 273
Joined: Wed Jun 27, 2007 5:37 pm

Post by MrSpock » Thu Dec 03, 2009 2:21 am

Easier to do with SORT, and certainly much more portable. Just a thought.

spawar4
Member
Posts: 21
Joined: Sun Oct 25, 2009 10:35 am

Post by spawar4 » Mon Apr 12, 2010 3:48 pm

use

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

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

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Mon Apr 12, 2010 8:18 pm

And what is RECORD-COUNT? Is it reserved word in Easytrieve?
Regards,
Anuj

spawar4
Member
Posts: 21
Joined: Sun Oct 25, 2009 10:35 am

Post by spawar4 » Tue Apr 13, 2010 8:53 am

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..

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Tue Apr 13, 2010 2:44 pm

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.
Regards,
Anuj

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others