Output of shell command in email notification

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
cyclogenisis
Premium Member
Premium Member
Posts: 48
Joined: Wed Jan 07, 2015 3:30 pm

Output of shell command in email notification

Post by cyclogenisis »

Hello,

Would like to add the output of a shell execute stage to the body of a notification activity.

Currently I have setup as following:

Execute Stage ---> Notification Stage

Here is an image of the Notification Stage, as you see I am trying to add the command output of the execute stage to the body of the email.

http://imgur.com/7ks3q2h

However, when I receive the notification in my inbox all I see if the following:

"#Get_missing_data.#"

What am I doing wrong.? It would seem silly if this was not possible to do in the body yet you can do this in the email subject. Thanks in advance
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Silly it may be but I don't recall them ever adding the ability to parameterize the body of the email, unfortunately. Unless they've added that in more recent versions, the solution has been to take the DSSendMail routine and create a tweaked version of it to include that functionality.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It remains true that the body can not be parameterized. However you can direct the output into a file (perhaps using tee command) and specify an attachment to the email. The pathname of the attachment CAN be parameterized.
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 »

True that.
-craig

"You can never have too many knives" -- Logan Nine Fingers
cyclogenisis
Premium Member
Premium Member
Posts: 48
Joined: Wed Jan 07, 2015 3:30 pm

Post by cyclogenisis »

Hi Ray, funny you suggest this as this is exactly what I implemented. I've set up the trigger on whether there was output from my command or not.
Post Reply