Sending an Email

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
chowdary
Participant
Posts: 38
Joined: Thu Jun 23, 2005 11:25 am

Sending an Email

Post by chowdary »

Hi,

I have scenario where i need to read data from a table and if the table has data i need to write that data into a flat file and send an email with this flat file as an attachment.Can any one suggest me what is best way of approaching this scenario.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

1. Write a job to spool the table to a file.
2a. Write Batch job to run job #1, then either issue a unix command to check the file for data (wc -l is a good choice), or use the DSGetLinkInfo API to query job #1 for the link row count to get the row count. If a non-zero value is found then either issue a unix mailx command or try to use the SDK supplied function for sending emails.
2b. Alternative, use a Sequencer to do all of 2a.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
trokosz
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 16, 2004 6:38 pm
Contact:

Post by trokosz »

Use the Notification Stage in the Sequencer
Post Reply