MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Deleting Files from server

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
Piscesian
Beginner


Joined: 17 Dec 2004
Posts: 14
Topics: 8
Location: Monrovia,California

PostPosted: Sat Jun 11, 2011 5:43 am    Post subject: Deleting Files from server Reply with quote

Hi,

I have an FTP step in the last step of a JCL which deletes .PDF files from a server(close to 900 PDF files). The problem is that if any of the files is being used or open, job abends with RC=16 giving message "File not accessible for deletion". I need to avoid this job from abending by either
1) Skip the file that's in use and go and delete the next file.
2) Forcefully delete the file even if it's in use.

Can anybody let me know resolution for this or any workaround that can be implemented in order to prevent job from abending?


Thanks!
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Sat Jun 11, 2011 8:54 am    Post subject: Reply with quote

Why are you deleting files hat are still obviously required? Sort that out and you have no problem
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Sat Jun 11, 2011 11:33 am    Post subject: Reply with quote

Quote:
The files may no longer be needed. . .
If the server users in Monrovia are like many others, they open things and then go home for the night (or the weekend) leaving the file(s) in use. . .

Would it be possible to schedule a process on the file server to empty the directory (if all files are to be deleted) or create a file of the individual deletes to be run from the server schedule.
_________________
All the best,

di


Last edited by papadi on Sat Jun 11, 2011 3:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Sat Jun 11, 2011 1:55 pm    Post subject: Reply with quote

Piscesian,

If it is a windows server you can check for ERRORLEVEL 1 or 2 after the delete statement and then decide on the action to be taken.


Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group