How can I clear job log with DSJOB or using some routine?

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
igorbmartins
Participant
Posts: 161
Joined: Mon Mar 17, 2008 10:33 am

How can I clear job log with DSJOB or using some routine?

Post by igorbmartins »

Guys, I would like to know how I can clear job log with DSJOB or using some routine. It is possible? I have a big sequence and its log is very long. In this sequence there is an infinity loop and running during 23 hours. This sequence only start others jobs/sequences so its log is not important to me, but the others log is very important. In DataStage Administrator I configured the Auto-purge Up to previous (job runs) with 5.

Thanks.
dinagiza
Premium Member
Premium Member
Posts: 21
Joined: Tue Dec 11, 2007 3:52 am

Re: How can I clear job log with DSJOB or using some routine

Post by dinagiza »

First, if you want to clear the log only once, you can do it from the DS Director.
Where do you store you logs? In the repository or Universe?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It's not possible with any dsjob option to clear a job log.

You could create a server job or a routine called from a sequence to purge the log, and run that from dsjob.

(I'm pretty certain there's code somewhere on DSXchange for that routine.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If your logs are stored in the 'Universe' repository:

CLEAR.FILE RT_LOGnnnn

(where 'nnnn' corresponds to the internal job number of this job) will essentially truncate the log. Purge criteria will more than likely need to be re-established after that.
-craig

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