Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 10396
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: 10396
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: 2092
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 Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us