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

Copies the contents of multiple GDG's to a PS file


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

Active User


Joined: 13 Dec 2005
Posts: 154
Location: The Netherlands

PostPosted: Thu Mar 27, 2008 4:13 pm
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Mar 27, 2008 4:24 pm
Reply with quote

Set up a dummy IEFBR14 to build a +1 generation before the sort step
Back to top
View user's profile Send private message
prav_06
Warnings : 1

Active User


Joined: 13 Dec 2005
Posts: 154
Location: The Netherlands

PostPosted: Thu Mar 27, 2008 4:41 pm
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Mar 27, 2008 4:55 pm
Reply with quote

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 icon_wink.gif
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Thu Mar 27, 2008 5:14 pm
Reply with quote

Nifty solution expat - I wish I'd have thought of it.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Mar 27, 2008 5:26 pm
Reply with quote

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 icon_eek.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Mar 28, 2008 2:56 am
Reply with quote

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.. icon_confused.gif

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... icon_smile.gif
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
Search our Forums:

Back to Top