Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8657
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: 8657
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: 972
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: 8657
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 IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts converting a mainframe file with ASA ... Lynne Schuler All Other Mainframe Topics 5 Wed Apr 04, 2018 9:44 am
No new posts VSAM File free space sancraig16 JCL & VSAM 13 Fri Mar 30, 2018 1:02 am
No new posts write multiple lines in PS file in cobol Balu5491 COBOL Programming 7 Wed Mar 07, 2018 10:27 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us