Send Email Notification with attachment
Moderators: chulett, rschirm, roy
Send Email Notification with attachment
Hi all. My project plan to send an email to notify system administrator once an ftp file has been successfully loaded into DataStage.
May I know how to generate an email notification in parallel job?
and if we would like to attach a file in the email, what should we do to accomplish that?
By the way, we are using DataStage version 7.1.
Hope to get your opinion and experience on this issue. Thanks very much.
Cheers~~~
May I know how to generate an email notification in parallel job?
and if we would like to attach a file in the email, what should we do to accomplish that?
By the way, we are using DataStage version 7.1.
Hope to get your opinion and experience on this issue. Thanks very much.
Cheers~~~
-
- Participant
- Posts: 81
- Joined: Wed Jul 14, 2004 3:18 am
- Location: Johannesburg, South Africa
- Contact:
DataStage 7.5 supports attachments with e-mail notifications. The readme for 7.5 says:
Of course, I haven't even laid eyes on 7.5 yet...
Code: Select all
- Additions to Notify Stage
The Notification Activity can now send attachments. Multiple attachments
are also supported. All fields may include parameters, except the email
body.
Morney le Roux
There are only 10 kinds of people: Those who understand binary and those who don't.
There are only 10 kinds of people: Those who understand binary and those who don't.
Are Sequencer jobs not available in PX/EE? You would use a Notification Activity stage to send an email. Either that or write your own script and use it as an 'After Job' object.
On the subject of attachments, this was just discussed this week and probably hasn't even scrolled off to the second page yet. Check here for the thread.
On the subject of attachments, this was just discussed this week and probably hasn't even scrolled off to the second page yet. Check here for the thread.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Hi Chulett. I have read thru the discussion. You provided a line of code in your reply in the topic. So, do you mean i need to include the code in a routine in DataStage? Then it will work after that? Or I still need to do something else to get it work?
Secondly, when do we need a mail client as i read through the topics regarding sending mail notification in DataStage. They were saying we need a mail client in order to get everything work? Is it needed just for prior version?
Really thanks for your help. I am new to the tool. So do hope can get guidance here. Thanks again.
Secondly, when do we need a mail client as i read through the topics regarding sending mail notification in DataStage. They were saying we need a mail client in order to get everything work? Is it needed just for prior version?
Really thanks for your help. I am new to the tool. So do hope can get guidance here. Thanks again.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Job Sequences are not parallel jobs.
The only possible way to send email from a parallel job would be to use any method for executing an operating system command. You really don't want to do this; it will slow your data processing immensely.
Instead, run your parallel jobs from a job sequence (or from your own Job Control code), detect whatever it is you need to in the controller, and sent notification from there.
The only possible way to send email from a parallel job would be to use any method for executing an operating system command. You really don't want to do this; it will slow your data processing immensely.
Instead, run your parallel jobs from a job sequence (or from your own Job Control code), detect whatever it is you need to in the controller, and sent notification from there.
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.
I have been read through most of the posting regarding this topic in this forum. After reading all the postings, i have get some information and ideas on how to send an email notification and attachment. However, I still could not figure out how to get all the steps putting together to make things work here.
From my understanding, we can use the mailx command to send the mail. I really wonder where should i start all this. In a job or a sub routine? I do hope there is someone out there that can explain me in details the steps that i should take to get it done.
I would appreciate the help that provided. Hope to get some information from you all. Thanks very much in advance.
Cheers~~
From my understanding, we can use the mailx command to send the mail. I really wonder where should i start all this. In a job or a sub routine? I do hope there is someone out there that can explain me in details the steps that i should take to get it done.
I would appreciate the help that provided. Hope to get some information from you all. Thanks very much in advance.
Cheers~~
Re: Send Email Notification with attachment
I have done this in my last project
I need ed to send the REJECT FILE as an attachment to the user, The approach I have taken is created a script (IN UNIX) and append the file to the body of the message and send the email to the user Hope this might help but If your file is too large it might be not a good approach
Create a Job sequencer for the JOB you are running and call Execute_Command stage in it call the script in the execute command stage
Hope I this might help you need more info I can explain to give me a call @ 248-370-0409
cheers..
I need ed to send the REJECT FILE as an attachment to the user, The approach I have taken is created a script (IN UNIX) and append the file to the body of the message and send the email to the user Hope this might help but If your file is too large it might be not a good approach
Create a Job sequencer for the JOB you are running and call Execute_Command stage in it call the script in the execute command stage
Hope I this might help you need more info I can explain to give me a call @ 248-370-0409
cheers..
kate_gkl wrote:Hi all. My project plan to send an email to notify system administrator once an ftp file has been successfully loaded into DataStage.
May I know how to generate an email notification in parallel job?
and if we would like to attach a file in the email, what should we do to accomplish that?
By the way, we are using DataStage version 7.1.
Hope to get your opinion and experience on this issue. Thanks very much.
Cheers~~~
Hi ram1899. Thanks for offering help.
I have some doubts here. Hope you can explain to me.
In the Execute Command stage, under exec command tab, I need to put the file that having the script in the command field. Am I correct? What do I need to fill in the parameter field?
May I know what function or command are you using in your script? Is it DSSendMail?
Thank you in advance. Hope to hear from you soon.
p/s: May I know which country is the phone number belongs to? Cause i worry that my phone at client site not able to call this number? Hope you dont mind to tell me.
Cheers~~~
I have some doubts here. Hope you can explain to me.
Do you mean I need to have a Job Activity stage to include my job. After that set the trigger and connect to Execute Command stage?Create a Job sequencer for the JOB you are running and call Execute_Command stage in it call the script in the execute command stage
In the Execute Command stage, under exec command tab, I need to put the file that having the script in the command field. Am I correct? What do I need to fill in the parameter field?
May I know what function or command are you using in your script? Is it DSSendMail?
Thank you in advance. Hope to hear from you soon.
p/s: May I know which country is the phone number belongs to? Cause i worry that my phone at client site not able to call this number? Hope you dont mind to tell me.
Cheers~~~