Latest logdetails using RT_LOG file
Posted: Fri Dec 23, 2011 1:30 am
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!
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!