Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How can i get the total number of records in a huge file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
keane

New User


Joined: 24 Jul 2006
Posts: 11

PostPosted: Wed May 02, 2007 5:11 pm    Post subject: How can i get the total number of records in a huge file
Reply with quote

Is there any posiiblity to find the number of records in huge files such as TAPE files by either using sort or any other method?
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed May 02, 2007 6:24 pm    Post subject:
Reply with quote

Yes, it is.

You can use PGM=ICEGENER, and use //SYSUT2 DD DUMMY.
The record count should be in the SYSPRINT DD output.

With DFSORT you can generate a one record file with the record count in it if you need to pass it to another step / job. Use //SORTOUT DD DUMMY

Don't ask me how, because I don't know how, but feel sure that one of the other contributors will be forthcoming.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed May 02, 2007 7:29 pm    Post subject:
Reply with quote

Hello,

If the location uses a tape management system, there is usually information there. I believe you can also get the block count from SMF.

If it really is huge, whatever that means at you installation, i'd suggest not reading the entire file(s) for nothing more than a record count - unless the info is not in the available SMF data or the tape library system.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed May 02, 2007 7:37 pm    Post subject:
Reply with quote

Dick,

I had thought of mentioning using the TMS for tapes, and it works near enough accurately for FB files give or take a blocks worth of records, but not quite so for the VB ones.

I suppose if there is no need for ultimate accuracy, a rule of thumb number would suffice, then I would say YES for VB files too.

Number of blocks used * records per block
is something I've used in the past for guestimates of tape records. I would imagine that in most cases the VB LRECL would provide a reasonable input to the guess, but who knows how wildly different the lengths would be.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed May 02, 2007 8:40 pm    Post subject:
Reply with quote

If you want to get a count of the records by reading the file with DFSORT, you can use the technique discussed in the "Display the number of input or output records" Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us