HOW to Delete Job Log via Command?

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
tjhaosse
Participant
Posts: 10
Joined: Sun Jun 11, 2006 6:45 am
Location: HongKong

HOW to Delete Job Log via Command?

Post by tjhaosse »

I am some problem about purge job log in Datastage Server.

I need to purge job log via command not in Director!

Do anyone know how to use command (not in Administrator or uv) to purge all log in a job ?

Best Regards!
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Welcome to DSXChange.

There is no built-in command with which you can delete a specific job's log file contents. It is possible to write some some in BASIC to do this and I think that parts have been posted here before.

It is best to stick with the standard purge mechanism, i.e. purging a job's log automatically after n-days or n-executions.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Re: HOW to Delete Job Log via Command?

Post by DSguru2B »

tjhaosse wrote:I need to purge job log via command not in Director!
Welcome Aboard,
Care to elaborate on that?
If you do a command line purge it will remove the default purge settings. And if you forget to run the command again, your log file will grow without any check. Hence ArndW's suggestion of setting with Director's auto purge settings.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

The posts Arnd talks about have \\PURGE.SETTING in them. Do a search. You can do a SQL DELETE to delete the rows without removing your purge settings. It is possible. Maybe not recommended. Ken Bland has a job or routine on his web site to set all the purge settings for every job. Look for that routine. Maybe a combination of his code and something else will get you what you really want.
Mamu Kim
Post Reply