IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to know the number of records within a dataset


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
madlui56

New User


Joined: 08 Aug 2006
Posts: 61
Location: Philippines

PostPosted: Mon Jul 09, 2007 10:36 am
Reply with quote

How to know the number of records within a dataset(flatfile) without going inside nor just typing max down(m f8) on the command line?

Thanks.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jul 09, 2007 10:52 am
Reply with quote

Hello,

To know the number of records "something" must "going inside"? The number of blocks might be found, but the number of records that would be read into a program, not. Space used is easily available externally, but number of records is not.

One easy way to find the number of records in a file is to use your sort product. If you search in the sort forum or even in this jcl section, you will find examples of getting a record count via sort.

I don't know a way to get a record count online without opening the file and "going inside".
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Mon Jul 09, 2007 10:55 am
Reply with quote

Using FILEAID you can get the record count without opening the file.
Back to top
View user's profile Send private message
madlui56

New User


Joined: 08 Aug 2006
Posts: 61
Location: Philippines

PostPosted: Mon Jul 09, 2007 10:57 am
Reply with quote

Where specifically on fileaid or on what command?
Thanks.
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Mon Jul 09, 2007 11:01 am
Reply with quote

Option 3, and then 8
Quote:
Interactive Utility

give dataset name
and press enter
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Mon Jul 09, 2007 11:04 am
Reply with quote

You can use SORT to get the count

See the "Display the number of input or output records" Smart DFSORT Trick at:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
Back to top
View user's profile Send private message
madlui56

New User


Joined: 08 Aug 2006
Posts: 61
Location: Philippines

PostPosted: Mon Jul 09, 2007 11:05 am
Reply with quote

how about if it is on tape or mean tape files?
is is ok to use fileaid coz it is issuing a " file not on dasd message"

Thanks
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Mon Jul 09, 2007 11:11 am
Reply with quote

Quote:
how about if it is on tape or mean tape files?

Use SORT
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jul 09, 2007 11:12 am
Reply with quote

Hello,

When you post a question, you need to include the important information. Fileaid and other online tools typically do not process tapes.

Depending on which tape management system your organization uses, the record count may be available there - talk with your storage administration people.
Back to top
View user's profile Send private message
madlui56

New User


Joined: 08 Aug 2006
Posts: 61
Location: Philippines

PostPosted: Mon Jul 09, 2007 11:33 am
Reply with quote

Thanks for the information guys..
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
Search our Forums:

Back to Top