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

How to know end of GDG version


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Fri Nov 06, 2009 1:43 pm
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
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
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: 8797
Location: Welsh Wales

PostPosted: Fri Nov 06, 2009 2:14 pm
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
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
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

Superior Member


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

PostPosted: Fri Nov 06, 2009 7:17 pm
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
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: 107
Location: India

PostPosted: Wed Nov 11, 2009 1:40 pm
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: 107
Location: India

PostPosted: Wed Nov 11, 2009 1:44 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Wed Nov 11, 2009 2:06 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
No new posts Copying GDG version(all/few) from pro... CLIST & REXX 13
No new posts XMITIP Latest Version JCL & VSAM 2
No new posts How to determine TLS/SSL version in m... TSO/ISPF 2
Search our Forums:

Back to Top