Page 1 of 1

Sending an Email

Posted: Mon Dec 05, 2005 3:17 pm
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.

Posted: Mon Dec 05, 2005 3:47 pm
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.

Posted: Mon Dec 05, 2005 6:35 pm
by trokosz
Use the Notification Stage in the Sequencer