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
 

 

Counting the records in a GDG

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Counting the records in a GDG
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: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 16, 2009 1:51 pm    Post subject:
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    Post subject: Reply to: Counting the records in a GDG
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: 6967
Location: porcelain throne

PostPosted: Thu Apr 16, 2009 2:17 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 16, 2009 3:48 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Apr 16, 2009 3:52 pm    Post subject: Re: Counting the records in a GDG
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

Moderator Team Head


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

PostPosted: Thu Apr 16, 2009 3:55 pm    Post subject: Reply to: Counting the records in a GDG
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

Site Director


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

PostPosted: Thu Apr 16, 2009 9:38 pm    Post subject:
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    Post subject:
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    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 Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm


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