Cleanup / Housekeeping system generated files like &PH&a

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Manfred Hagedorn
Participant
Posts: 58
Joined: Wed Apr 04, 2007 10:02 am

Cleanup / Housekeeping system generated files like &PH&a

Post by Manfred Hagedorn »

Hello,
i found accidential tousands of files (collected over the years) in a &PH& folder.
I have searched in the forum already, for housekeeping e.g. the &PH& subfolder for a project.
I always find a hint to the CLEAR.FILE command.
I understand, this is a manual on demand task.
But i would like to automate this task and let it be done by scheduled unix jobs.
Question: can i simply remove files older then e.g. 10 days from this &PH& folder?
like: find &PH& -mtime +10 -exec rm -f {} \;
Or would i damage any system files by this?

Further question: if i can do as suggested, are there other folders which should be cleaned up regular?

Hope, anybody can help me.
Thanks a lot and best regards - Manfred
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, something like your find command running in cron is pretty typical. And other than your job logs, which auto-purge should handle, there really isn't any other directory needing housekeeping.
-craig

"You can never have too many knives" -- Logan Nine Fingers
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

When you go to 8.1 there are some internal MachineLog files in /tmp that are used by the resource tracker. They are supposed to cleanup automatically, but aren't. However there's a patch for both 8.0.1 and 8.1 to fix that.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
Manfred Hagedorn
Participant
Posts: 58
Joined: Wed Apr 04, 2007 10:02 am

Post by Manfred Hagedorn »

Craig, thanks for feedback. My main concern was, to damage any still needed files. No i will do the deletion by any unix commands.

Andy, currently it is not planned to go to 8x.

Thanks a lot !!! Manfred
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

CLEAR.FILE is damaging if jobs are running, checking for anything 2+ days old there should be perfectly safe unless your jobs run for days, that is. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Beaulieu80
Participant
Posts: 3
Joined: Wed Dec 16, 2009 7:58 am

Re: Cleanup / Housekeeping system generated files like &

Post by Beaulieu80 »

How do we run the DS command in a unix script?

/usr/local/ds/Ascential/DataStage/Projects/$ValueProjectName/'&PH&'


but was is command to execute this line? I have my project name and logins but cant find the good command to execute it.

Manfred Hagedorn wrote:Hello,
i found accidential tousands of files (collected over the years) in a &PH& folder.
I have searched in the forum already, for housekeeping e.g. the &PH& subfolder for a project.
I always find a hint to the CLEAR.FILE command.
I understand, this is a manual on demand task.
But i would like to automate this task and let it be done by scheduled unix jobs.
Question: can i simply remove files older then e.g. 10 days from this &PH& folder?
like: find &PH& -mtime +10 -exec rm -f {} \;
Or would i damage any system files by this?

Further question: if i can do as suggested, are there other folders which should be cleaned up regular?

Hope, anybody can help me.
Thanks a lot and best regards - Manfred
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's not a "command" of any kind but rather a path and &PH& simply a directory. From UNIX, empty it just like you would any other directory.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply