View previous topic :: View next topic
|
Author |
Message |
isnehil Warnings : 1 New User
Joined: 10 Oct 2007 Posts: 23 Location: mumbai
|
|
|
|
Hi all,
Can any one please suggest me any way of knowing the number of records in a TAPE file..
Please suggest...
Thanks,
~ Snehil |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Search the forum, this has been discussed many times. |
|
Back to top |
|
|
isnehil Warnings : 1 New User
Joined: 10 Oct 2007 Posts: 23 Location: mumbai
|
|
|
|
Hi expat,
I searched thru the forum, but couldn't find a satisfactory thread....
I want to read TAPE files thru REXX only... my team has been using DFSORT/ICETOOL for the same....
Is there any way thru which I can get the record count of the tape file without submitting a job..
please advise.... thanks again..
~ Snehil |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
look at the tape management system commands
but why use rexx when sort will outperform by a factor of 5 |
|
Back to top |
|
|
isnehil Warnings : 1 New User
Joined: 10 Oct 2007 Posts: 23 Location: mumbai
|
|
|
|
Hi enrico.... thanx 4 ur reply....
my requirement is to find only the record count of TAPE file...
My team uses DFSORT to do so...which consumes long time for files with millions of records...
so... I am searching for some faster way to get the record count thru REXX if possible..
can you please give me links or any relevant info regarding how to do this using TMS or any other way...
your suggestion wud be helpful..
thanks,
~Snehil |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Go talk to your storage people, they probably produce a report with what you want |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
As your team discovered already, the only accurate method is to read and count the records. And, yes, this is a waste of resources.
The best solution is for the creating job to display the EOJ counts of each file for later reference. Otherwise, if your tape management system can give block count, you can approximate the number based on (average?) records per block * BLKCOUNT. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
My team uses DFSORT to do so...which consumes long time for files with millions of records... |
DFSORT would not take a particularly "long time" to count millions of records using a COPY application. What does your DFSORT job for getting the count look like? Maybe it's not as efficient as it could be. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If the process that creates the tape has no need to create the record count and put it somewhere, why do you need to later re-read the entire file to merely count records? Is there any business requirement for this?
If the count has any importance, i'd suggest it be created/stored when the file is written.
As was mentioned, your tape management system should be able to get you the approximate number of records (if not the exact count).
My guess is that if some process needs the data on the tape, it will read all of the records regardless of how many records are on the tape. . . |
|
Back to top |
|
|
|