View previous topic :: View next topic
|
Author |
Message |
vinay ng Currently Banned New User
Joined: 30 May 2008 Posts: 13 Location: Mumbai
|
|
|
|
I would like to write a REXX code to search for all the files in a JCL which has Disposition parameter as 'NEW' and delete those files.
could anyone please help me out. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
I hope you have a very good understanding of jcl. You will need to be able to handle proc's (including instream proc's), symbolic substitutions, and overrides. Good luck it will be harder than you think. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You would also need to be careful of any dsn that is used as input in an early step, deleted at that time and then re-created later in the process. If that dataset is automatically deleted by this new scan/delete process, the job will fail and the dataset will have to be rebuilt before the job can run.
(Unfortunately?), this is practice was quite common for non-gdg datasets at many places.
Speaking of gdg datasets, those would also need to be exempt from the scan/delete process.
As Craig said "Good Luck" When you have something working, i am sure people here would appreciate it if you post your solution. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
.... i am sure people here would appreciate it if you post your solution. ...
I wouldn' t reinvent the wheel
I do not know anything about the TS ,
but I certainly trust Gilbert Saint Flour and file 183 of the CBT tape |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
I would like to write a REXX code to search for all the files in a JCL which has Disposition parameter as 'NEW' and delete those files. |
I recommend that you scan the JCL in your PDS and before the jobs are submitted, to change the JCL so that any files created by the job are deleted when no longer needed.
It might be as simple as changing DISP=(NEW,CATLG), to DISP=(NEW,DELETE). Or you may need to add an additional step to delete the files. It might take you several attempts to fix your JCL.
Providing 'good' JCL should be a requirement of the people writing the JCL. |
|
Back to top |
|
|
|