Page 1 of 1

Removing all log files

Posted: Sun May 05, 2002 7:00 pm
by Starg
Is there a way to delete all logfiles in a project. I do not mean after a given date, or after a certain number of runs. Its our development environment so we do not wish to delete log files on a regular basis, just every now and again.

We are on 5.1 on Solaris 2.8

Thanks

Start

Posted: Tue May 07, 2002 3:00 am
by nigel
I suppose you require clearing all the logs instead of deleting them.

If so you can write a routine to select all the jobs from the DS_JOBS datastage system hash file. You can then obtain the job numbers for each log by looping through each entry. Once in the loop, you could issue a retrieve command EXECUTE "CLEAR.FILE DATA DS_LOG":xx where xx is the job number.


Hope this helps

Nigel

Posted: Wed May 08, 2002 12:25 am
by Starg
Thanks Nigel, I did not do it exactly the way you suggested (I used a shell script, as I am much more familiar with shell scripting than DS Basic).. but the result was the same, the CLEAR.FILE DATA [Blah} worked a treat.

Thanks

Starg