Sending LOGFile after unsucsessfull JOB

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
kakaiser
Participant
Posts: 4
Joined: Wed Feb 12, 2003 2:36 am

Sending LOGFile after unsucsessfull JOB

Post by kakaiser »

Hi,
Running a DS5.1 enviroment, i got a question regarding sending mails in an error case.
Is it possible to use DSSendmail to send the DS logfile if there are errors or warnings in it?
Or are there other workarounds to look after warnings from a remote place, without having DS installed locally?

Thanx

Karsten Kaiser
Hewlett Packard Services
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The DataStage log file is a hashed file (to all intents and purposes a database table), so is not something that can be attached to or included in an email message.
In any case you probably do not require the entire job log, just error and warning messages from the current run.
Probably the easiest way to accomplish this is with a Routine that uses DSGetNewestLogId() to determine the requisite messages, and DSGetLogEntry() to retrieve the relevant event details. These can be written to a text file, or assembled into a string for direct sending.


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