Latest logdetails using RT_LOG file

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
kamesh
Participant
Posts: 72
Joined: Tue May 27, 2003 1:47 am

Latest logdetails using RT_LOG file

Post by kamesh »

Hi,

I can easily extract the latest run log of a multi instance job for a given invocation using dsjob CLI command but it takes forever when there is too much log and instances.

dsjob -logdetail <Project> <Job>.<InvocationID>

I tried below command but it returns two log runs info including latest and have same WAVE.NO, but I need only latest run log info. So, what field holds latest run tag for a given invocation in RT_LOG?

$DSHOME/bin/dssh "SELECT @ID FMT '20L',TIMESTAMP FMT '20L',EVAL \"IF @RECORD<7> MATCHES '' THEN 'NULL' ELSE @RECORD<7>\" FMT '100L' AS INVOCATION, FULL.TEXT FMT '260L', WAVE.NO FMT '20L' FROM RT_LOG87 WHERE CAST(@ID AS VARCHAR) NOT LIKE '/%' and INVOCATION=<INV ID> and WAVE.NO=(SELECT MAX(WAVE.NO) FROM RT_LOG87 WHERE INVOCATION=<INV ID>) ORDER BY @ID SUPPRESS COLUMN HEADING COUNT.SUP COL.SPCS;"

Thanks in advance!
kamesh
Participant
Posts: 72
Joined: Tue May 27, 2003 1:47 am

Re: Latest logdetails using RT_LOG file

Post by kamesh »

I think everyone is on vacation but appreciate if anyone has any clue of my requirement below.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You need to get the last ID using dsjob -loginfo. This needs to be added to your SELECT WHERE clause.
Mamu Kim
kamesh
Participant
Posts: 72
Joined: Tue May 27, 2003 1:47 am

Post by kamesh »

Thank you Duke!

I think you mean dsjob -lognewest or dsjob -logsum but this should be run before we start the job and should be used after job is completed in the where clause to get the latest log details.

This would be a two step process. Don't we have any flag within the RT_LOG which keeps track of latest run for a given invocation?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There is no flag. You could, of course, determine the most recent "job started" event by constraining on max of TIMESTAMP and event type.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply