Hello All,
I am having issue in sending mail notification through datastage.
the design of my sequence is as follows
execute command stage-----User variables_Activity---Notification activity
In execute command stage I am trying to read the param file through cat command,the file consists of few email addresses,I need to send mails to them If my job aborts.
But I am struggling to pass proper email addresses in the receiver's list in the notification activity.In the user variable activity stage I have used Oconv function but that is not giving me the desired result.
Can you please suggest what else I can try?
Many thanks in advance.
Regards,
Pragb
sending mail from a param file in datastage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 96
- Joined: Mon May 14, 2012 1:30 pm
Use the following code in User Variable Activity will get all the email address in the Email_List User Variable
UserVariables_Activity_89
Email_List : Field(Convert(@FM, "", ExecCommand.$CommandOutput),'',1)
And then in the Mail Notification activity in the Recipient Email Address write the following code:
#UserVariables_Activity_89.Email_List#
UserVariables_Activity_89
Email_List : Field(Convert(@FM, "", ExecCommand.$CommandOutput),'',1)
And then in the Mail Notification activity in the Recipient Email Address write the following code:
#UserVariables_Activity_89.Email_List#
Hi Pragb,
To get rid of this problem you can use the tr -d '\n' command in execute command activity. For example, if you are using the command cat filename in execute command then it should be-
Now the output from the execute command should wok fine for the notification activity.
To get rid of this problem you can use the tr -d '\n' command in execute command activity. For example, if you are using the command cat filename in execute command then it should be-
Code: Select all
cat filename | tr -d '\n'
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: