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
 

 

How to know end of GDG version

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
kaushik8205

New User


Joined: 10 Nov 2006
Posts: 49
Location: Canada

PostPosted: Fri Nov 06, 2009 1:35 pm    Post subject: How to know end of GDG version
Reply with quote

Hi,

If GDG base is given as an input, is there a way in which we can identify the end of one version.

For example if number of records in each version needs to be counted...

Thanks.
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: Fri Nov 06, 2009 1:43 pm    Post subject:
Reply with quote

/RANT ON

When talking about GDS it is important to use the correct terminology, as both version and generation are both valid in terms of a GDS.

It is a well known fact that only one version of a GDS may exist at any one time, however, multiple generations may exist together.

Please learn and use the correct terminology when posting, as using the wrong term can cause confusion and possibly delay a resolution to your problem

/RANT OFF

And after that - your question is not clear. What is it that you want to know.
Back to top
View user's profile Send private message
kaushik8205

New User


Joined: 10 Nov 2006
Posts: 49
Location: Canada

PostPosted: Fri Nov 06, 2009 2:04 pm    Post subject:
Reply with quote

Sorry for the confusion, i meant generations.

Question is if we give GDG base as an input having 10 generations, is there a way to identify the end of generation.

To elaborate more consider this example:

File Layout:
Name Amount

1st generation of GDG:
KK 111
AA 222

2nd generation of GDG:
LL 333
II 444
SS 111

Considering only 2 generations of GDG are present, giving GDG base as an input I want the output as:

Sum1 = 333
Sum2 = 888

Please make note that while giving GDG base as an input I do not know the number of generations present for that GDG and also I do not know the number of records in each generation.

Hoping I am clear this time can you please provide me with a solution.

Thanks
Back to top
View user's profile Send private message
manuwankenobi

New User


Joined: 02 Mar 2006
Posts: 32
Location: FRANCE

PostPosted: Fri Nov 06, 2009 2:10 pm    Post subject:
Reply with quote

Hello,

IDCAMS listcat will give you all information needed :

Code:

GDG BASE ------ UDMZ.A500.RACF.DUMP.F0100                   
     IN-CAT --- CATALOG.DMZ                                 
     HISTORY                                                 
       DATASET-OWNER-----(NULL)     CREATION--------2008.329
       RELEASE----------------2     LAST ALTER------2009.105
     ATTRIBUTES                                             
       LIMIT------------------2     SCRATCH          NOEMPTY
     ASSOCIATIONS                                           
       NONVSAM--UDMZ.A500.RACF.DUMP.F0100.G0007V00           
       NONVSAM--UDMZ.A500.RACF.DUMP.F0100.G0008V00           
   NONVSAM ---- UDMZ.A500.RACF.DUMP.F0100.G0007V00           
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: Fri Nov 06, 2009 2:14 pm    Post subject:
Reply with quote

So you want to sum fields within a file.
Each file is a GDS file
You want to specify the GDG base as input.

Well, I know that DFSORT and SYNCSORT can do some pretty smart things, but not sure if they can do this one.

We need t owait and see if the sort gurus can throw some light on it.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Nov 06, 2009 5:42 pm    Post subject:
Reply with quote

this link from wednesday shows a slick little trick to accomplish this, once you know the absolute dsns.

further search of the DFSORT or REXX forum (which I an not going to do) will provide examples of stripping/culling a LISTCAT (see manuwankenobi's post, above) to dynamically generate JCL DD statements.

a combination of the two will provide a solution to this thread.

there is another consideration. If counting records is so important, do it at ds creation time!!!!
Back to top
View user's profile Send private message
kaushik8205

New User


Joined: 10 Nov 2006
Posts: 49
Location: Canada

PostPosted: Fri Nov 06, 2009 7:12 pm    Post subject:
Reply with quote

Thanks DICK,

I got the solution using ICETOOL.
What I really wanted to know got it from Kevin.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Fri Nov 06, 2009 7:17 pm    Post subject:
Reply with quote

Who is Kevin here in this thread?
Back to top
View user's profile Send private message
kaushik8205

New User


Joined: 10 Nov 2006
Posts: 49
Location: Canada

PostPosted: Fri Nov 06, 2009 7:25 pm    Post subject:
Reply with quote

I had posted in COBOL forum asking if there is a way recognize end of GDG generation in COBOL program using file status or any other way..
In that Kevin(superk) answeerd precisely and perfectly --> Nope
Back to top
View user's profile Send private message
hiravibk
Warnings : 1

Active User


Joined: 14 Dec 2008
Posts: 103
Location: India

PostPosted: Wed Nov 11, 2009 1:40 pm    Post subject:
Reply with quote

kaushik8205 wrote:
I had posted in COBOL forum asking if there is a way recognize end of GDG generation in COBOL program using file status or any other way..
In that Kevin(superk) answeerd precisely and perfectly --> Nope

Could you please share this thread(kevin's reply)? I am also trying to identify the end of a generation from the output data set of a listcat.

Thankk you
Back to top
View user's profile Send private message
hiravibk
Warnings : 1

Active User


Joined: 14 Dec 2008
Posts: 103
Location: India

PostPosted: Wed Nov 11, 2009 1:44 pm    Post subject:
Reply with quote

hiravibk wrote:
kaushik8205 wrote:
I had posted in COBOL forum asking if there is a way recognize end of GDG generation in COBOL program using file status or any other way..
In that Kevin(superk) answeerd precisely and perfectly --> Nope

Could you please share this thread(kevin's reply)? I am also trying to identify the end of a generation from the output data set of a listcat.

Thankk you

I am sorry . my requirement is not to analyse the listcat output..I want to count the records in each generation.
Sorry for the confusion
Back to top
View user's profile Send private message
kaushik8205

New User


Joined: 10 Nov 2006
Posts: 49
Location: Canada

PostPosted: Wed Nov 11, 2009 1:50 pm    Post subject: Reply to: How to know end of GDG version
Reply with quote

Hi,

For your requirement, you can use listcat to list all the generations of GDG base in a temporary dataset. Then using this dataset you can use icetool to count number of records in each generation. But this is a bit complex solution as you will have to generate control cards dynamically for each generation.

Thanks.
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: Wed Nov 11, 2009 2:06 pm    Post subject:
Reply with quote

Why oh why is there this sudden rush to count records. Things been a bit slow this month ?

Proper planning and coding in the first place should ALWAYS display counts of records read and/or written. Why waste time and resource doing again what should have been done in the first place icon_evil.gif
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 COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am
No new posts Is there a time Version of DATEDIFF ? Bill Woodger DFSORT/ICETOOL 1 Wed Aug 17, 2016 7:06 pm
No new posts Syncsort version supporting FINDREP c... juares castro SYNCSORT 9 Tue Aug 09, 2016 6:54 pm
No new posts Faccing issues while creating a GDG V... sravindra_s JCL & VSAM 5 Thu Jun 23, 2016 11:26 am
No new posts Fujitsu Cobol 85 to IBM Cobol (Any ve... umakalikiri COBOL Programming 4 Fri Apr 15, 2016 7:40 am


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