Remove log entries

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
Nagac
Premium Member
Premium Member
Posts: 127
Joined: Tue Mar 29, 2011 11:39 am
Location: India

Remove log entries

Post by Nagac »

Hi

I want to remove all job log entries created 5 days before through command prompt.

I know we can use CLEAR.FILE RT_LOG<Job Number> to remove whole log entries for job, but can some one suggest how to remove only unnecessary entries. DS Director allows to do these but we are not allowed to login.

Also, please advise if i can run CLEAR.FILE for whole project?

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

Re: remove log

Post by chulett »

Nagac wrote:Also, please advise if i can run CLEAR.FILE for whole project?
As in all at once? No, not that I've ever seen. It is strictly one by one.

For your "unnecessary" ones I suppose you could write a script to check the directory age and then run CLEAR.FILE on the ones that meet your criteria. Make sure you are aware that clearing the log like that will also remove the Auto Purge rules entry for it... or at least that was how it worked in the past, perhaps that is no longer the case.
-craig

"You can never have too many knives" -- Logan Nine Fingers
PaulVL
Premium Member
Premium Member
Posts: 1315
Joined: Fri Dec 17, 2010 4:36 pm

Post by PaulVL »

Well, if you absolutely want to chop it at 5 days max, then I would set the project limit to 5 days, then create a short script that does a reset on each job that is not currently running.

A reset will put an entry into the job log.
The job will auto purge based upon 5 days.

After your script runs, you now have the option to reset the auto purge duration. Keep in mind that you failed to purge any job that was currently running since the purge happens at the start of the job, not in the middle.
Post Reply