View previous topic :: View next topic
|
Author |
Message |
useit
Active User
Joined: 05 Oct 2006 Posts: 152
|
|
|
|
i have to delete all the generations. till i find the empty genaration.
say example
gdg (1)-non empty
gdg (2)-non empty
gdg (3)----empty
gdg (5)-non empty
in this case genearation 3 is empty so i have to delete only gdg (1), gdg(2) and want to retain only gdg(5).
please help me regarding the same.
Regds,
useit |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
What do you mean by "empty"?
Quote: |
in this case genearation 3 is empty so i have to delete only gdg (1), gdg(2) and want to retain only gdg(5). |
If I follow the above, then 3 has to vanish in a puff of magic smoke :-) |
|
Back to top |
|
|
useit
Active User
Joined: 05 Oct 2006 Posts: 152
|
|
|
|
hi,
EMPTY means it doesnt have any data in it(emty file).
non empty means those generations have some data in it.
vasanth,
if its a flat file i can do it thru IDCAMS.but in my case its a gdg file.
say for example. gdg base has 5 generations.
BASE.G0001V001
BASE.G0002V001
BASE.G0003V001
BASE.G0004V001
BASE.G0005V001
if the 4th version of the gdg base is empty(doesnt have any data in it). then i need to delete BASE.G0001V001
BASE.G0002V001
BASE.G0003V001
and keep only BASE.G0004V001
BASE.G0005V001
if the second geneartion of the base is empty BASE.G0002V001.then i shud delete BASE.G0001V001
and keep onlyBASE.G0002V001
BASE.G0003V001
BASE.G0004V001
BASE.G0005V001
i would be really thankfull. if someone can help me in this regard.
regds,
useit. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Should not be in DFSORT forum. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
I wonder about the competence of people setting this requirement
deleting generations in the middle of the generation active set
will just f**k up all the jcl streams using relative GDG addressing/specification |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 581 Location: London
|
|
|
|
What is the issue with a generation being empty? If it is then the program should cope with that and continue reading other generations as required.
If it is because you're using relative generation references (i.e. (0) or (-1) etc and don't want an empty generation selected then it is a design issue. Maybe GDG's are not appropriate for what you're using them for and a MOD'd flatfile would be better? |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Write a rexx program to read through the gdgs - various topics on how to get the relevant generation numbers exist. If there is data - delete. If no data - terminate.
And get a grip on this a gdg is NOT a special type of file format - it is a naming convention. Your gdg dataset can be a flat file - FB or VB or a backup file or many other types of file. If you rename the file to a non-gdg name the data and its organisation stays exactly the same. So IDCAMS can handle it no problem. |
|
Back to top |
|
|
useit
Active User
Joined: 05 Oct 2006 Posts: 152
|
|
|
|
because in down the line there are two jobs which will process these gdg file.
job1 should process all 5 generations. and job 2 which would run after job1 should proces whatever the genearations
which are present after the empty generations.
so in my first job after proccessing all the 5 generations i want to delete whatever
the generations which are present before this empty gdg geneartions. so that only those generations after
this empty gdg generations will be considered in the next step.
Regds,
useit |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
useit,
We've been through all these now:
selective deletion of generation
Tricky scenario
TRICKY GDG QUERY
how to delete selective number of generations from one GDG?
I have to say that it looks like someone came up with the idea of "Use GDGs" and then things started to slide as nothing else was paid any attention. You are now struggling from one stumbling-block to another.
Currently you want to delete up-to-and-excluding a dataset that is empty. What if there is no empty dataset? Or are you creating an empty dataset just so there is one, for "definite"?
I can't see how, without a complete picture of what you are doing, we can do much but abet your one-step-forward-hit-head-on-wall-so-ask-another-gdg-question approach. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Whzt business reason might there be to implement such a convoluted mess. . .
I suspect beneath it all there is a rather simple process needed, but the way this has been presented (completely fragmented and with no real goal in sight), it is surely not obvious.
Unless something approaching an explanation is posted, i believe this and all of the similar space/time wasters should be locked/deleted. . . |
|
Back to top |
|
|
|