View previous topic :: View next topic |
Author |
Message |
kalaignar_rs Beginner
Joined: 08 Apr 2006 Posts: 3 Topics: 3
|
Posted: Mon Apr 24, 2006 4:14 am Post subject: JCL |
|
|
Hi..
I have a production JCL, Which is a daily job and its going 2 create a new ps file. For creating a new ps file how can i code disp parameter? Without changing the JCL or deleting the PS file (already created) how can i achieve the same?
If i use disp = mod...Then first day it will create new PS, during its second run it will append the records.
My requirement i- create a new PS file (daily) without changing the JCL.
Thanks
Kalaignar |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Apr 24, 2006 4:57 am Post subject: |
|
|
kalaignar_rs,
1. Please follow the forum rules.
2. Do not code a topic title with forum name such as JCL
3. Please Post it in the right forum. you posted a JCL related question in DB2 forum.
To answer your question code an IEFBR14 step as the first step to delete the dataset and in the next step create the dataset as usual with disp=(new,catlg,delete)
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Bill Dennis Advanced

Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Mon Apr 24, 2006 9:05 am Post subject: |
|
|
Code DISP=OLD and it will rewrite the file each day. _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity. |
|
Back to top |
|
 |
Phantom Data Mgmt Moderator

Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Wed Apr 26, 2006 1:33 am Post subject: |
|
|
Kalaignar_rs,
Quote: |
Without changing the JCL or deleting the PS file (already created) how can i achieve the same?
|
What is forcing you to lay such a restriction ? Kolusu's solution is the usual standard way of coding a JCL/PROC.
You can follow Bill's suggestion, but you must create the PS (empty / with some data) somehow, even before the job runs for the first time.
If you can give us a detailed information of your actual requirement, we can suggest better alternatives.
Thanks,
Phantom |
|
Back to top |
|
 |
|
|