How to Attach a Log File in Email-Notification activity
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 9
- Joined: Thu Jul 10, 2008 6:18 pm
How to Attach a Log File in Email-Notification activity
Hi,
I am using Datastage 7.0, I want to send a log file when the job gets fail.how to Attach a Log File in Email-Notification activity.is there any property to set this ..
Thanks
I am using Datastage 7.0, I want to send a log file when the job gets fail.how to Attach a Log File in Email-Notification activity.is there any property to set this ..
Thanks
kishore
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
DataStage does not have log files. Job logs are database tables.
What kind of log file are you wishing to attach?
Being on version 7.0 you will need to write your own routine to invoke sendmail() with attachments. The ability to do this from DataStage was introduced in version 7.5.
What kind of log file are you wishing to attach?
Being on version 7.0 you will need to write your own routine to invoke sendmail() with attachments. The ability to do this from DataStage was introduced in version 7.5.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 9
- Joined: Thu Jul 10, 2008 6:18 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: How to Attach a Log File in Email-Notification activity
No, not until you upgrade to at least the 7.5 version. Stick with your routine for now.kishorebhulokam wrote:I am using Datastage 7.0, I want to send a log file when the job gets fail.how to Attach a Log File in Email-Notification activity.is there any property to set this ..
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 27
- Joined: Thu Mar 20, 2008 11:55 am
How to get detail Job Log in email using notification activity in DS 7.5 ?
Right now.. I am using IncludeJobStatus in Notification Activity Stage.
But, It just provides me whether job activity finished sucessfull or Aborted. It doesn't give me the error details if a JobActivity Fails.
Right now.. I am using IncludeJobStatus in Notification Activity Stage.
But, It just provides me whether job activity finished sucessfull or Aborted. It doesn't give me the error details if a JobActivity Fails.
Thanks.
"Creativity is the ability to use your available resources to their fullest."
"Creativity is the ability to use your available resources to their fullest."
As noted above, you would need to create a routine to dump the desired log to a text file, then that file can be added as an attachment to a Notification email. The "7.5 version" reference was for the attachment part, not the job log part.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 112
- Joined: Mon Jul 11, 2005 7:54 am
Alternately after your job failure/completion run the command or create a shell script where in the job name,project name is passed dynamically with the following command in the shell script ...
dsjob -logsum <project name> <job name>
Have a Notification activity stage which attaches this log file.
Regards,
Vinod
dsjob -logsum <project name> <job name>
Have a Notification activity stage which attaches this log file.
Regards,
Vinod
-
- Participant
- Posts: 27
- Joined: Thu Mar 20, 2008 11:55 am
Thanks for the reply Vinod,
I tried the command, These were the output lines.
117 INFO Mon Nov 10 13:51:03 2008
main_program: Explanation: (...)
118 INFO Mon Nov 10 13:51:04 2008
main_program: Dump: (...)
119 INFO Mon Nov 10 13:51:04 2008
main_program: This step has 1 dataset: (...)
120 INFO Mon Nov 10 13:51:05 2008
main_program: Schemas: (...)
How to eliminate these (...) and print full information ?
I tried the command, These were the output lines.
117 INFO Mon Nov 10 13:51:03 2008
main_program: Explanation: (...)
118 INFO Mon Nov 10 13:51:04 2008
main_program: Dump: (...)
119 INFO Mon Nov 10 13:51:04 2008
main_program: This step has 1 dataset: (...)
120 INFO Mon Nov 10 13:51:05 2008
main_program: Schemas: (...)
How to eliminate these (...) and print full information ?
Thanks.
"Creativity is the ability to use your available resources to their fullest."
"Creativity is the ability to use your available resources to their fullest."
-
- Participant
- Posts: 27
- Joined: Thu Mar 20, 2008 11:55 am
How do I get the log details of a job (job activity) inside a sequence job ?
If I have Sequence job with couple of Job activites..
Job1==>Job2===>Job3
then the log of Sequence Job shows something like below...
Job1 Finished,Status=1(Finished OK)
Job2 did not finish OK, status = 'Finished with warnings'
Job3 aborted reply 255
How can I get the log details of Job2 & Job3 in log details of Sequence job itself ?
If I have Sequence job with couple of Job activites..
Job1==>Job2===>Job3
then the log of Sequence Job shows something like below...
Job1 Finished,Status=1(Finished OK)
Job2 did not finish OK, status = 'Finished with warnings'
Job3 aborted reply 255
How can I get the log details of Job2 & Job3 in log details of Sequence job itself ?
Thanks.
"Creativity is the ability to use your available resources to their fullest."
"Creativity is the ability to use your available resources to their fullest."
-
- Participant
- Posts: 597
- Joined: Fri Apr 29, 2005 6:19 am
- Location: Singapore