View previous topic :: View next topic
|
Author |
Message |
kaushik8205
New User
Joined: 10 Nov 2006 Posts: 49 Location: Canada
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
/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 |
|
|
kaushik8205
New User
Joined: 10 Nov 2006 Posts: 49 Location: Canada
|
|
|
|
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 |
|
|
manuwankenobi
New User
Joined: 02 Mar 2006 Posts: 32 Location: FRANCE
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
kaushik8205
New User
Joined: 10 Nov 2006 Posts: 49 Location: Canada
|
|
|
|
Thanks DICK,
I got the solution using ICETOOL.
What I really wanted to know got it from Kevin. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Who is Kevin here in this thread? |
|
Back to top |
|
|
kaushik8205
New User
Joined: 10 Nov 2006 Posts: 49 Location: Canada
|
|
|
|
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 |
|
|
hiravibk Warnings : 1 Active User
Joined: 14 Dec 2008 Posts: 107 Location: India
|
|
|
|
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 |
|
|
hiravibk Warnings : 1 Active User
Joined: 14 Dec 2008 Posts: 107 Location: India
|
|
|
|
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 |
|
|
kaushik8205
New User
Joined: 10 Nov 2006 Posts: 49 Location: Canada
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
Back to top |
|
|
|