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
 

 

No. of lines in a tape file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: No. of lines in a tape file
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 05, 2008 3:05 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10276
Location: italy

PostPosted: Thu Jun 05, 2008 3:32 pm    Post subject: Reply to: No. of lines in a tape file
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 05, 2008 4:37 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Thu Jun 05, 2008 8:37 pm    Post subject:
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

Site Director


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

PostPosted: Thu Jun 05, 2008 10:32 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


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