DSSendMail - Attachement - DataStage Server 7.0

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
caltog
Premium Member
Premium Member
Posts: 39
Joined: Thu May 22, 2003 7:32 am

DSSendMail - Attachement - DataStage Server 7.0

Post by caltog »

Hello

I try to look for an answer in the forum but I only found for 7.5.
Is there any possibility to attach a file with DSSendmail or with Notification Activity ?

Thanks
abhi989
Participant
Posts: 28
Joined: Mon Sep 19, 2005 2:31 pm

Post by abhi989 »

two ways you can do it.

1) through unix
add an execute command activity stage in a sequence.

type as follow

Under command : /bin/ls
Under Parameters : directory_where_the_file_is; mail -s 'subject email_address_you_want_to_mail_to<full_path_to_the_location_to_the_file

2)

Add Notification Activity stage -- type necessary parameters
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Support for attachments in the Notification Activity was introduced in version 7.5. It is not available in versions earlier than this.

I can only assume (not having version 7.0 to check) that the same is true for the DSSendMail() function. However, since DSSendMail() ultimately calls the sendmail() function - the SMTP client, you could create your own mailer and invoke that from your job sequence via Execute Command.
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 »

You can also use uuencode for the attachment file and pipe the output to a mail function like mailx for example.

D'oh! If you were on UNIX, that is. :wink:

For Windows, I'd stick with blat.
Last edited by chulett on Wed Sep 26, 2007 7:30 am, edited 1 time in total.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

In EtlStats there is a routine to call to send attachments using blat.exe for Windows and another using Craig's method calling a shell script named Email.ksh. Both are included in the zip file. I think both have been posted on this site.
Mamu Kim
caltog
Premium Member
Premium Member
Posts: 39
Joined: Thu May 22, 2003 7:32 am

Post by caltog »

Thanks a lot

I'll investigate yours answers.
saikir
Participant
Posts: 92
Joined: Wed Nov 08, 2006 12:25 am
Location: Minneapolis
Contact:

Post by saikir »

Hi,

As stated earlier by Ray, the option to attach files is introduced in 7.5. You can use Blat for sending mails with attachments. We have been using blat succesfully in our project for some time now

Sai
caltog
Premium Member
Premium Member
Posts: 39
Joined: Thu May 22, 2003 7:32 am

Post by caltog »

It' s work with :

uuencode "FilenameWithPath" "FileNameInMail" | mailx -s "MailSubject" "Recipient"

But juste for one attached file.

Thanks
Post Reply