Page 1 of 1

How to fetch all entries of job log from unix?

Posted: Wed Jan 06, 2010 4:35 am
by zulfi123786
Can anyone help me with fetching all entries of job log from unix. I need to grep for a particular entry from the log.

Thanks

Posted: Wed Jan 06, 2010 6:06 am
by Sainath.Srinivasan
Did you try dsjob with loginfo

Posted: Wed Jan 06, 2010 6:55 am
by gssr

Code: Select all

dsjob -logsum <Project> <Job_name>

Posted: Wed Jan 06, 2010 11:51 pm
by zulfi123786
Thank you .....
I have one more query here....

I was trying to insert a warning into the log using call DSLogWarn ("[IBM][CLI Driver][DB2/AIX64] SQL1476N The current transaction was rolled back because of error -964. SQLSTATE=40506","MyRoutine")

but i am facing problem while insertin double quotes into the message tried doing with \" but didnot work any ideas?

Posted: Thu Jan 07, 2010 12:04 am
by zulfi123786
And One more question,

How to retreive only the last run log events, is there any built in funtionality?

Is it possible to fetch the Log events with one event in one line rather than all concatenated onto one line?

Posted: Thu Jan 07, 2010 2:59 am
by ray.wurlod
There are other options for retrieving the event ID of the most recent log event of particular type, and for retrieving the detail of any particular event.

Posted: Thu Jan 07, 2010 3:08 am
by zulfi123786
Yes I guess you are speaking about the dsjob -lognewest and dsjob -logdetail......

But here the requirement is to fetch all WARNIGS for the last run , this can be impelented by fetching the newest log event before and after the job run and then using the dsjob -logdetail to fetch all entries lying between the above said event numbers, but -logdetail i guess doesnot give the flexibility to fetch only WARNINGS it dumps all events

-logsum gives the fexibility to fetch only WARNINS but it is not possible to restrict the scope between two Event Numbers .

Above all both the commands dump all information into single line making the task more complicated.

Posted: Thu Jan 07, 2010 3:34 am
by Sainath.Srinivasan
Get the logsum or lognewest to give you the id and find rows with id greater that the newest start.

Alternatively you can get from RT_LOGnnn sets browsing in descending order.