I want to send a mail after the job with job status?

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
4friends
Participant
Posts: 71
Joined: Tue May 01, 2007 12:51 pm
Location: Mumbai

I want to send a mail after the job with job status?

Post by 4friends »

Hi All,

I want to send a mail after the job with job status?
Can u send the details wat r the settings we have to do?

Thanks in advance :!: :!: :!:
thanks & regards
kk
manjunathnet
Participant
Posts: 5
Joined: Fri Dec 22, 2006 2:11 am

Post by manjunathnet »

if u want send only job status as success or not, then u can use send mail notification in sequencer platte.

or

if u want send all the information about job status, then u can use dsjob -logsum in excute command and write it to a file, then next pass file as job status.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Do you think the email recipient might prefer the email to be in English?
Please use proper English on the DSXchange forum, it is difficult enough for non-English speakers to have to cope with correct English, much less with SMS-style affectations.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: I want to send a mail after the job with job status?

Post by sachin1 »

you can write a after job subroutine, which will track your job for successful execution and send a job status in mail.

you can use

Status_value = DSGetJobInfo (DSJ.ME, DSJ.JOBINTERIMSTATUS)

* Status_value Returns the status of a job after it has run all stages and controlled jobs.

IF Status_value = 2 THEN

send mail with status as 'ok'

end
else
send mail with status as 'fail'

end
you can use DSSendMail Function.
bkumar103
Participant
Posts: 214
Joined: Wed Jul 25, 2007 2:29 am
Location: Chennai

Post by bkumar103 »

in the sequence job, you have a notification activity stage. Here you have to give details for the reciepent mail id, sender mail id and all.
also one check box is provided to attach the job status log in the mail.
Post Reply