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

selective deletion of generation


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
useit

Active User


Joined: 05 Oct 2006
Posts: 152

PostPosted: Tue Sep 06, 2011 11:35 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Sep 06, 2011 11:47 am
Reply with quote

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
View user's profile Send private message
useit

Active User


Joined: 05 Oct 2006
Posts: 152

PostPosted: Tue Sep 06, 2011 12:32 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Sep 06, 2011 1:17 pm
Reply with quote

Should not be in DFSORT forum.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Sep 06, 2011 1:43 pm
Reply with quote

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
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 581
Location: London

PostPosted: Tue Sep 06, 2011 2:34 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Tue Sep 06, 2011 4:13 pm
Reply with quote

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
View user's profile Send private message
useit

Active User


Joined: 05 Oct 2006
Posts: 152

PostPosted: Tue Sep 06, 2011 5:16 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Sep 06, 2011 6:55 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Sep 06, 2011 8:45 pm
Reply with quote

Hello,

Whzt business reason might there be to implement such a convoluted mess. . . icon_confused.gif

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
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 DFHPI1008 JSON generation failed COBOL Programming 0
No new posts Started task using a generation dataset JCL & VSAM 7
No new posts Report generation JCL & VSAM 18
No new posts How can I get Generation Nbr of GDG f... IBM Tools 1
No new posts Sequence number generation for multip... DFSORT/ICETOOL 2
Search our Forums:

Back to Top