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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Copies the contents of multiple GDG's to a PS file
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: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 27, 2008 4:24 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 27, 2008 4:55 pm    Post subject:
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

Active Member


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

PostPosted: Thu Mar 27, 2008 5:14 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 27, 2008 5:26 pm    Post subject:
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

Senior Member


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

PostPosted: Fri Mar 28, 2008 2:56 am    Post subject:
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    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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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