Clear PH directory through a job

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
pqrabc
Participant
Posts: 20
Joined: Wed Nov 18, 2009 2:59 am

Clear PH directory through a job

Post 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 ?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
suresh.angadi
Participant
Posts: 17
Joined: Tue Jun 23, 2009 6:44 pm

Re: Clear PH directory through a job

Post 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
Suresh Angadi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Bad advice, impossible to implement. Why? Read my earlier post again.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply