Email Notification

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
beanieb
Participant
Posts: 6
Joined: Wed Jan 29, 2003 11:09 pm

Email Notification

Post by beanieb »

How do I send a email notification attached wif a text file, which say, contains the job/error log, in DataStage on unix? Bcos the fields in the notification page of the notification activity doesn't include one to attach file.

If I have to use the 'mailx' command in unix, how do i send the file attachment?

Thanks
mihai
Participant
Posts: 30
Joined: Thu Mar 13, 2003 5:24 am
Location: Hertfordshire

Post by mihai »

Without being able to test this proposed solution, I can't sure I'm 100% on it.

I'd look into building a script from DataStage, detailing the file to attach and so on, then invoking the mailer with the script as a parameter.


Kind regards,
Mihai

_________________________
desk direct:+441908448571
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

There are routines to extract information from the DataStage logs, off the top of my head I don't recall their names but they should be easy to look up. You can use them to get information out into a text file, but you'll probably have to code it up in Basic.

On sending mail, we occasionally use 'sendmail' but typically use something called 'mutt'. Mutt is a great little piece of GNU freeware (available from www.mutt.org) which, among other things, allows you to either attach files to or insert files into your email. You write a script to call mutt (or whatever) and then pass in whatever parameters are needed, including the filename to attach/insert. We do this in the controlling Batch after completion of the job and the log extracts.

Sorry, we don't use the Sequencer thingy so can't help you there.

-craig
chinek
Participant
Posts: 75
Joined: Mon Apr 15, 2002 10:09 pm
Location: Australia

Post by chinek »

Hi

you can use the dsjob command to extract from the Data Stage logs and send that through email. Some scripting is required.

I have developed a package that will monitor the jobs,populate the statistics like nbr of records loaded etc, check on the sqlldr messages,check for oracle messages,send notification and much more.
In a nutshell it is designed to free up having an operator monitor the jobs and allow managers to see what is happening asap. If you are interested please email me at
nick.chuah@txu.com.au
The package is still under beta testing but should be ready for release in 2 weeks time.

Nick
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There are several sites at which I have worked that employ a similar scheme. Yes, it does require a small amount of scripting. Once.
Remember that DataStage can do ANYTHING for which there exists a command line interface, simply by starting it through DSExecute().
One site even sends SMS messages.

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
Post Reply