| Author |
Message |
prav_06 Warnings : 1 Active User
Joined: 13 Dec 2005 Posts: 138 Location: Mumbai
|
|
|
|
I have a sort job which copies the contents of multiple GDG's to a PS file, and once successfully done the job should delete all the generations under the GDG
//SORTIN DD DSN=GDG01,DISP=(SHR,DELETE,KEEP)
// DD DSN=GDG02,DISP=(SHR,DELETE,KEEP)
But the problem is GDG01 and GDG02 may or may not have generations under it while this job is executing, if the GDG base does not have any entries under it the job should not fail. Is there any way to achieve this by modifying the DISP parameter, I have tried
DISP=(MOD,DELETE,KEEP) not working.
Thamilzan. |
|
| Back to top |
|
 |
References
|
Posted: Thu Mar 27, 2008 4:13 pm Post subject: Re: Copies the contents of multiple GDG's to a PS file |
 |
|
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 2186 Location: Brussels once more ...
|
|
|
|
| Set up a dummy IEFBR14 to build a +1 generation before the sort step |
|
| Back to top |
|
 |
prav_06 Warnings : 1 Active User
Joined: 13 Dec 2005 Posts: 138 Location: Mumbai
|
|
|
|
Hi Expat,
Thanks a ton for a quick reply, but is there any other way to achieve this, please let us know.
Thamilzan. |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 2186 Location: Brussels once more ...
|
|
|
|
Well, by setting up a +1 generation in the previous step there will always be in existence at least one generation of the GDG's before the sort step executes, so solves your problem.
If there was an easy way I would have said so  |
|
| Back to top |
|
 |
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 461 Location: Richmond, Virginia
|
|
|
|
| Nifty solution expat - I wish I'd have thought of it. |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 2186 Location: Brussels once more ...
|
|
|
|
| Phrzby Phil wrote: |
| Nifty solution expat - I wish I'd have thought of it. |
Damn, does that mean that my moment of genius has been used up for this year  |
|
| Back to top |
|
 |
Anuj D.
Senior Member
Joined: 22 Apr 2006 Posts: 1124 Location: Mumbai, India
|
|
|
|
Hi,
Yes this is
| Quote: |
| Set up a dummy IEFBR14 to build a +1 generation before the sort step |
what I've used many times at my shop.
| Quote: |
| Is there any way to achieve this by modifying the DISP parameter |
What made you to think that DISP can be helpful in this..
The DISP parameter is used to describe the "disposition" of a data set to MVS and to tell MVS how to handle the data set after the end of the step or job. You can specify one disposition for normal termination and another for abends. But when the "data set" itself is not there...what'll be "handled" by MVS ..?
| Quote: |
| Damn, does that mean that my moment of genius has been used up for this year |
Stupid in me would give you more chances in coming future..not to worry...  |
|
| Back to top |
|
 |
|
|