View previous topic :: View next topic
|
Author |
Message |
prav_06 Warnings : 1 Active User
Joined: 13 Dec 2005 Posts: 154 Location: The Netherlands
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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: 154 Location: The Netherlands
|
|
|
|
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: 8797 Location: Welsh Wales
|
|
|
|
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: 1042 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: 8797 Location: Welsh Wales
|
|
|
|
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 Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 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 |
|
|
|