Page 1 of 1

Clear PH directory through a job

Posted: Tue Apr 19, 2011 4:24 am
by pqrabc
Hi,

I need to clear Ph directory by scheduling a job. i tried doing it through after sub routine bt running into following error:

Unable to unlink the operating system file "DSD.RUN_21871_15815".
[EACCES] Permission denied
CLEAR.FILE was unable to complete processing.


Is it that since the job which calls this after sub routine finishes after the sub routine, the ph directory is nt cleared?

How can i achieve this ?

Posted: Tue Apr 19, 2011 4:27 am
by ray.wurlod
Its file in the &PH& directory is open while the job is open. You can't delete a file that is open for writing. Hence &PH& is not cleared. You would be better trying a command that deletes only closed files - maybe files more than a week old (as appropriate to your site).

Re: Clear PH directory through a job

Posted: Thu Apr 28, 2011 7:12 pm
by suresh.angadi
Hi,
write script which calls uvsh clear.file &PH&
call this script using the command activity in sequence after successfull execution of job

Regards
Suresh

Posted: Thu Apr 28, 2011 8:09 pm
by ray.wurlod
Bad advice, impossible to implement. Why? Read my earlier post again.