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

Counting the records in a GDG


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

New User


Joined: 14 Mar 2008
Posts: 28
Location: bangalore

PostPosted: Thu Apr 16, 2009 12:52 pm
Reply with quote

I would like to know how can I count the number of records in all the versions of a GDG, which are tapes. whthout copying them into a single file .

Thanks,
Karthik
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Apr 16, 2009 1:51 pm
Reply with quote

My first question would be why would you either want to do this, or need to do this.

One idea would be to use SORT to read the generations using DD DUMMY as SORTOUT and get the counts from the SYSOUT.

But, once again, why
Back to top
View user's profile Send private message
dkarthikreddy

New User


Joined: 14 Mar 2008
Posts: 28
Location: bangalore

PostPosted: Thu Apr 16, 2009 2:04 pm
Reply with quote

Thanks for the reply..
While analizing we came across this situation where in which we have to take the number of records and build our modules..
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 16, 2009 2:17 pm
Reply with quote

Quote:
But, once again, why


Quote:
While analizing we came across this situation where in which we have to take the number of records and build our modules..


sounds like to OP is training to be a politician.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Apr 16, 2009 3:48 pm
Reply with quote

Quote:
sounds like to OP is training to be a politician.

Or a manager icon_rolleyes.gif

I can honestly say that in 30+ years of IT I have never come across the need to know how many records are in a file.

Please give the reason for this crazy task.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Apr 16, 2009 3:52 pm
Reply with quote

dkarthikreddy wrote:
I would like to know how can I count the number of records in all the versions of a GDG, which are tapes. whthout copying them into a single file .
Who orginated this request?

And if this
Quote:
While analizing we came across this situation where in which we have to take the number of records and build our modules..
is true - one day, sooner or later, all of us would be too busy in counting the number of records in many files we deal with. . . icon_smile.gif. Suggest you tell us what your final goal is and why this approach was one of the alternatives - I believe, there may be better appraches to achieve that, once the requirement is understood.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Apr 16, 2009 3:55 pm
Reply with quote

A COUNT combined with NODETAIL in Syncsort doesn't require any records to be copied.
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 Apr 16, 2009 9:38 pm
Reply with quote

Hello,

Quote:
we have to take the number of records and build our modules..
What might be changed in the code that would depend on record count?

If you talk with the tape storage management people, they can probably tell you the amount of data contained in a tape file.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Thu Apr 16, 2009 10:16 pm
Reply with quote

If your tape management system is CA-1, you can get a good approximation for an FB file by calculating: (block size / logical record length) * block count.
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 Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top