Clearing job log

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
ogmios
Participant
Posts: 659
Joined: Tue Mar 11, 2003 3:40 pm

Clearing job log

Post by ogmios »

I'm using DataStage version 6.0 on Solaris and I'm seeing something strange happening with my log files in the RT_LOGXXX directories: they don't seem to shrink anymore, only grow. The behaviour seems to be that the size of the hash file always remains the largest as it ever was (and yes Autopurge is active). I don't remember this behaviour from previous versions.

If I look at the logs of certain jobs (without filter) via Director there are not that many entries to explain the large sizes (> 400Mb).

Does anyone know an easy way to clear the log without having to export/import and recompile the jobs in question.

Regards,
Ogmios
gpbarsky
Participant
Posts: 160
Joined: Tue May 06, 2003 8:20 pm
Location: Argentina

Post by gpbarsky »

Ogmios:

I'm trying to find out this way navigating by Universe tables, because I have the same problem. I have lot of jobs in the Director screen, and the only way I have to clear this is to use my finger to delete them.

When I have any solution to this topic, I will post it into this forum.

Be patient....[:D]

Guillermo P. Barsky
Buenos Aires - Argentina
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It looks like a change has been wrought in the engine. Try the following UniVerse command when the job log is not otherwise in use:
RESIZE RT_LOGnn * * *

If it's a really large log file, and the file system your project is on doesn't have much free space, add a USING clause:
RESIZE RT_LOGnn * * * USING /tmp

(The USING file system can be anywhere with sufficient space.)


Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Ogmios



JobName = "myjob"
open "DS_JOBS" to DsJobs else stop
read JobRec from DsJobs, JobName then
JobNo = JobRec
RtLog = 'RT_LOG':JobNo
Cmd = 'SELECT ':RtLog:' UNLIKE "/..."''
execute Cmd capturing output
Cmd = 'DELETE ':RtLog
DATA 'Y'
execute Cmd capturing output
end



.
.
.
I think this will work in a routine. I have not tried it. You could use a SQL DELETE command. I am not sure the syntax on the WHERE clause.

Kim.

Kim Duke
DsWebMon - Monitor over the web
www.Duke-Consulting.com
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Kim,

DELETE does not reclaim the space in a Type 30 file. It merely marks the space as free, able to be re-used. The only tools for reclaiming the space are RESIZE or COPY.

Regards,
Ray

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
Post Reply