View previous topic :: View next topic |
Author |
Message |
Piscesian Beginner
Joined: 17 Dec 2004 Posts: 14 Topics: 8 Location: Monrovia,California
|
Posted: Sat Jun 11, 2011 5:43 am Post subject: Deleting Files from server |
|
|
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 |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Sat Jun 11, 2011 8:54 am Post subject: |
|
|
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 |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Sat Jun 11, 2011 11:33 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Sat Jun 11, 2011 1:55 pm Post subject: |
|
|
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 |
|
|
|
|