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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts DSNACCOX (can it be run on 1 db/ts, t... SRICOBSAS DB2 3 Sat May 06, 2017 12:59 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm


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