Removing all log files

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
Starg
Participant
Posts: 16
Joined: Sun May 05, 2002 6:56 pm
Contact:

Removing all log files

Post 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
nigel
Premium Member
Premium Member
Posts: 35
Joined: Tue May 07, 2002 2:48 am
Location: South Africa/UK
Contact:

Post 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
Starg
Participant
Posts: 16
Joined: Sun May 05, 2002 6:56 pm
Contact:

Post 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
Post Reply