Sending email per records

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
yimwai
Participant
Posts: 46
Joined: Thu Jul 01, 2010 9:34 pm

Sending email per records

Post by yimwai »

A new requirement is to send emails to different persons according to the records in one table updated by other application.
suppose the table has only 3 fields:receiver,content,issent
we need to query all the record with issent 'N' and send email for each record
the receiver is in column 'receiver' and content in 'content' ,after sending the email , issent should be set to 'Y'
Any ideas how to implement this?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Do you really think this is a suitable job for an ETL tool?

Surely the email server itself can be scripted to perform this task.

That said, yes it is possible with DataStage, probably easiest using a sequence job.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
yimwai
Participant
Posts: 46
Joined: Thu Jul 01, 2010 9:34 pm

Post by yimwai »

I can not view your words after easiest using....
because the number of mails will not be more than 10, thus we don't want to have another application or script. could you please directly tell me which stages can be used?
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

I agree, that's not what DataStage is meant to do, but yes it can do it. It will become known as a spam server instead of an ETL application. Regretful.
Choose a job you love, and you will never have to work a day in your life. - Confucius
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

This type of work is often done, where a table is read into a job sequence to iterate one call per row - here each call would be to a mail stage rather than calling a job.

The simplest method is to have the sequence call a server job, which executes the SELECT and puts the collected result into the user status. This is then used in the calling sequence as the basis for a loop.

It is not a particularly clean solution, but is frequently used.
Post Reply