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

No. of lines in a tape file


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

New User


Joined: 10 Oct 2007
Posts: 23
Location: mumbai

PostPosted: Thu Jun 05, 2008 3:01 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jun 05, 2008 3:05 pm
Reply with quote

Search the forum, this has been discussed many times.
Back to top
View user's profile Send private message
isnehil
Warnings : 1

New User


Joined: 10 Oct 2007
Posts: 23
Location: mumbai

PostPosted: Thu Jun 05, 2008 3:26 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jun 05, 2008 3:32 pm
Reply with quote

look at the tape management system commands

but why use rexx when sort will outperform by a factor of 5
Back to top
View user's profile Send private message
isnehil
Warnings : 1

New User


Joined: 10 Oct 2007
Posts: 23
Location: mumbai

PostPosted: Thu Jun 05, 2008 3:49 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jun 05, 2008 4:37 pm
Reply with quote

Go talk to your storage people, they probably produce a report with what you want
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Thu Jun 05, 2008 6:22 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Thu Jun 05, 2008 8:37 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Jun 05, 2008 10:32 pm
Reply with quote

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
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 Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top