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
 

 

selective deletion of generation

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

Active User


Joined: 05 Oct 2006
Posts: 141

PostPosted: Tue Sep 06, 2011 11:35 am    Post subject: selective deletion of generation
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Tue Sep 06, 2011 11:47 am    Post subject: Reply to: selective deletion of generation
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: 141

PostPosted: Tue Sep 06, 2011 12:32 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Tue Sep 06, 2011 1:17 pm    Post subject: Reply to: selective deletion of generation
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Sep 06, 2011 1:43 pm    Post subject: Reply to: selective deletion of generation
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 User


Joined: 31 Dec 2009
Posts: 437
Location: London

PostPosted: Tue Sep 06, 2011 2:34 pm    Post subject:
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: 1712
Location: UK

PostPosted: Tue Sep 06, 2011 4:13 pm    Post subject:
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: 141

PostPosted: Tue Sep 06, 2011 5:16 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Tue Sep 06, 2011 6:55 pm    Post subject:
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

Site Director


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

PostPosted: Tue Sep 06, 2011 8:45 pm    Post subject:
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    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 Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm
No new posts alphanumeric sequence generation sivaprasad.gadhi COBOL Programming 6 Wed Mar 30, 2016 3:03 am
No new posts alphanumeric sequence generation sivaprasad.gadhi DFSORT/ICETOOL 8 Mon Mar 21, 2016 1:09 am
No new posts Need to do selective update in JCL manuwankenobi DFSORT/ICETOOL 1 Mon Sep 07, 2015 4:23 pm
No new posts DFSORT - Retrieve selective records f... narasimha_devi DFSORT/ICETOOL 8 Thu Aug 06, 2015 4:12 pm


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