IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

delete newly created files


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vinay ng
Currently Banned

New User


Joined: 30 May 2008
Posts: 13
Location: Mumbai

PostPosted: Tue Jun 17, 2008 5:33 pm
Reply with 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.
could anyone please help me out.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Jun 17, 2008 5:57 pm
Reply with quote

You realize that
You need a bit of knowledge about all the control block chains ??


look at
http://www.ibmmainframes.com/viewtopic.php?t=30982&highlight=cleanup
for a better alternative

also since You have already a tool to do it why reinvent the wheel
http://www.ibmmainframes.com/viewtopic.php?t=31374&highlight=cleanup
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Jun 17, 2008 6:06 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jun 17, 2008 8:46 pm
Reply with quote

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" icon_smile.gif When you have something working, i am sure people here would appreciate it if you post your solution.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Jun 17, 2008 9:40 pm
Reply with quote

.... 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 icon_biggrin.gif ,
but I certainly trust Gilbert Saint Flour and file 183 of the CBT tape
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Jun 17, 2008 10:01 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top