DSSendMailTester Rouitne

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
prasad_chennai
Participant
Posts: 38
Joined: Wed Jul 18, 2007 12:23 am
Location: Chennai

DSSendMailTester Rouitne

Post by prasad_chennai »

I am sending a email Notification in my one of my jobs whenever the Validation Fails( Like If we encounter with Null value then i am triggering a Email Notification).I am using the 'DSSendMailTester' routine in a Basic Transformer to achieve this functionality.

whenever the Null values occurs, i will send an email about the same with corresponding values in it.
Once i run this job with null values then it sending a email without any problem.After this, if i take a another run of the same without having null values in it then also its sending mail with the values of the previous Null Values (run).
But all the values loaded to the DB are good.
But unnecessary i am getting Multiple Email Notifications.
Please guide about this.what would be the problem?

Thanks,
prasad
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ugh. Why not write the bad vaules to a file, then send one email after the job completes if the file is populated rather than sending an email for every bad record? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
prasad_chennai
Participant
Posts: 38
Joined: Wed Jul 18, 2007 12:23 am
Location: Chennai

Post by prasad_chennai »

I have proposed same what you said,but users want it like this only.for every bad record they need mail.

Code: Select all

 Oracle Source-------Transformer-----------Oracle target
                          |
                          |
                   Basic Transformer
                           |
                           |
                    Sequential File
I have mentioned IsNotNull(LNK.XXXX) function in Transformer stage.if i get null values, those are rejected into the Reject link.I am using stage varibles where i am calling DSsEndMailTester Routine.

These stage varibles will execute for every record and i will get the Mail Notification if reocrds are rejected to Reject Link.Normally its working Fine,but sometimes its sending duplicate mails for two consecutive Runs of Null value run and Non Null value data Run continuosly.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Prediction: user requirement will change once they start getting lakhs of emails from this process.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply