How to deal with Job Log ?

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
xinhuang66
Participant
Posts: 161
Joined: Wed Aug 02, 2006 4:30 am

How to deal with Job Log ?

Post by xinhuang66 »

How can I send out all job logs by email after job finished/abort...

thanks
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post by I_Server_Whale »

You can use the 'Notification_Activity' in a job sequence with the option 'Include Job Status in Email' checked.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Use the Notification activity in the Job Sequence.
Check the "Include job status in email", you should get what you want.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Dooh.. late...

xinhuang66,
Moving forward, please post in appropriate forum.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

General probably IS the appropriate forum, since the answer will be the same irrespective of job type.

If you want the entire log, use an after-job subroutine. Perhaps use ExecSH to invoke dsjob, or "roll your own" using the DataStage API.

Better, use a downstream activity in the job sequence, because the "job finished" event has not yet been logged when the after-job subroutine is executing.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

ray.wurlod wrote:General probably IS the appropriate forum, since the answer will be the same irrespective of job type.
Gave it a thought, don't know why I still posted it :roll: Guess I had a long day..
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
xinhuang66
Participant
Posts: 161
Joined: Wed Aug 02, 2006 4:30 am

Post by xinhuang66 »

narasimha wrote:Use the Notification activity in the Job Sequence.
Check the "Include job status in email", you should get what you want.
Job status information is not enough..

what I want to get is the job log information for the finished job ?

Is developing a job routine the only way to get it ??

thanks
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

xinhuang66 wrote: what I want to get is the job log information for the finished job ?

Is developing a job routine the only way to get it ??
Yes, as Ray already specified above.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You don't need to develop a routine, though it would be more flexible. ExecSH (or ExecSHSilent) is supplied with the product - all you have to supply is the command line for dsjob command to dump the log.
Last edited by ray.wurlod on Fri Jan 12, 2007 2:46 pm, edited 2 times in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

And to help with that, as with most commands, you can execute dsjob without any arguments to get the 'usage' statement. That and read the Server Job Developer's Guide pdf, down near the end there is a chapter on the Command Line Interface which rather thoroughly explains all of the various options - including the ones needed to farm job logs.

They even mention what 'DSGet*' function each one is equivalent to, so you could use that as a guide if you desired to approach this from a custom routine rather than a scripted standpoint.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply