Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

delete newly created files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: delete newly created files
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Tue Jun 17, 2008 5:57 pm    Post subject: Reply to: delete newly created files
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    Post subject:
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

Site Director


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

PostPosted: Tue Jun 17, 2008 8:46 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Tue Jun 17, 2008 9:40 pm    Post subject: Reply to: delete newly created files
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

Senior Member


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

PostPosted: Tue Jun 17, 2008 10:01 pm    Post subject: Reply to: delete newly created files
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us