GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Mainframe  >  JCL
Go To First  |  Previous Question  |  Next Question 
 JCL  |  Question 33 of 128    Print  
What could be the disposition parameter that i would have to use in the jcl if i have a file that has to be created newly for every successful run of the program ,but at the same time it should retain the old data if my program abend in the middle and restarts. could you please provide me the code?

  
Total Answers and Comments: 5 Last Update: August 19, 2006     Asked by: vineeth 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: pradeepbhatt
 

DISP can be like one of these:

1. DISP = (OLD,KEEP,DELETE)

2. DISP = (OLD,CATLG,DELETE)



Above answer was rated as good by the following members:
Alfredo Wagner
February 03, 2006 08:08:00   #1  
karthik        

RE: what could be the disposition parameter that i wou...
Disp (new catlg delete)
 
Is this answer useful? Yes | No
February 17, 2006 06:21:43   #2  
vikas jain        

RE: what could be the disposition parameter that i wou...
can you please explain why u have used delete for the abnormal termination.
 
Is this answer useful? Yes | No
March 06, 2006 18:22:09   #3  
Eugene        

RE: what could be the disposition parameter that i wou...

I would do in this way:

create 2 new steps- in the very beginning of your JCL

//JS05 exec pgm iefbr14 < delete data set as run starts

//dd01 dd dsn <your file name>

// disp (mod delete delete) unit sysda space (trk 1)

//JS06 exec pgm iefbr14 < create data set as run starts

//dd01 dd dsn <your file name>

// disp (new catlg catlg)

//unit sysda space .................... DCB ..................

Then in that step(s) you want to update this file set for it

//............. disp mod can be also old depending on your logic -

i.e. if you want to add data to what was there - mod if just read or overwrite - old

// unit ....

After abend you will restart from from any step after JS06 and your data set is kept.

In any new run it will be deleted and created in the very beginning of the job.


 
Is this answer useful? Yes | No
June 06, 2006 02:54:36   #4  
pradeepbhatt Member Since: May 2006   Contribution: 10    

RE: what could be the disposition parameter that i wou...

DISP can be like one of these:

1. DISP (OLD KEEP DELETE)

2. DISP (OLD CATLG DELETE)


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
August 19, 2006 14:23:09   #5  
Chandru        

RE: what could be the disposition parameter that i wou...

U can use... DISP (MOD DELETE KEEP)

This will create the dataset if it is not present... Deletes the dataset in case of Normal Execution and KEEPs the dataset in case of abnormal termination and the file can be used in the next run as the disp it is MOD.


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape