Count the number of records on tape file.
-
- Registered Member
- Posts: 15
- Joined: Wed Oct 22, 2014 8:51 am
Count the number of records on tape file.
Hi,
Can we find out the number of records on a tape file, the condition is not to write a program in cobol or any other language. Tape file is huge and can contain up to 25 million records.
I have looked at SORT example, but I just need the count. I used sortout as dummy on a small file, but will it be a good idea for the huge file too, in terms of CPU usage.
Thanks
Can we find out the number of records on a tape file, the condition is not to write a program in cobol or any other language. Tape file is huge and can contain up to 25 million records.
I have looked at SORT example, but I just need the count. I used sortout as dummy on a small file, but will it be a good idea for the huge file too, in terms of CPU usage.
Thanks
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Count the number of records on tape file.
Does your site use a tape management system? If so, check to see if the tape management system can give you the number of blocks for the file? If so, simple arithmetic will give you a pretty close estimate of the records: block size divided by record length gives records per block times the number of blocks gives you an upper bound on the number of records. That would be adequate for almost any requirement for the record count.
-
- Registered Member
- Posts: 15
- Joined: Wed Oct 22, 2014 8:51 am
Re: Count the number of records on tape file.
Yes, we use CA-Tape management tool. I have never used it as such but will try to find out what you have said.
Another thing, when a program reads the tape-file, does that do the same calculation as you've suggested, I mean like a SORT utility?
Another thing, when a program reads the tape-file, does that do the same calculation as you've suggested, I mean like a SORT utility?
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Count the number of records on tape file.
SORT (no matter which program) actually reads every block in the tape file, deblocks the records, and proceeds from there.
-
- Registered Member
- Posts: 15
- Joined: Wed Oct 22, 2014 8:51 am
-
- Registered Member
- Posts: 16
- Joined: Tue Jan 20, 2015 8:40 am
Re: Count the number of records on tape file.
CA Tape management can give you the number of records, but I doubt you can use that number in a program. It's like using a tool=panel and looking at that number.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute