Hi ,
Is there any way to send email from DS based on some condition? For ex. I have to check color code condition for each record. if color code is 'red' then i have to send an one email with all records with colour code 'red'
Thanks in advance..
Hari
Email from DS stage
Moderators: chulett, rschirm, roy
Hari,
you can specifically send mail in a stage from a Sequencer, via a DSSendMail subroutine call, or just by executing a UNIX or Windows shell and calling an appropriate command-line based mail program.
You can find details about using mail within DS by using the Forum's search facility.
you can specifically send mail in a stage from a Sequencer, via a DSSendMail subroutine call, or just by executing a UNIX or Windows shell and calling an appropriate command-line based mail program.
You can find details about using mail within DS by using the Forum's search facility.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Sure.
Set up a link to a sequential file that your 'red' records get sent down. After that there are different ways to solve the next part of the puzzle.
You could write an 'after job' routine that uses DSGetLinkInfo to see how many rows went down that link and then, if it is greater than zero, use DSExecute to call a script (or sendmail or DSSendMail) to send the appropriate email. You'd have to handle the 'attaching' of the actual output file yourself.
If you are using a Sequencer job to control all this, something similar. A Routine Activity stage could call a generic routine (one that you write) to get that same link row count from the previously run job. Then a trigger from that stage could be linked to a Notification Activity stage when the return count is greater than zero. DataStage 7.5 supports attachments in the Notification Activity stage, so that part becomes even easier if you have that version. Otherwise, you'll need to fall back on the 'attach it yourself' scenario.
A couple of approaches to ponder...
(waves at Arnd who snuck in while I was typing)
Set up a link to a sequential file that your 'red' records get sent down. After that there are different ways to solve the next part of the puzzle.
You could write an 'after job' routine that uses DSGetLinkInfo to see how many rows went down that link and then, if it is greater than zero, use DSExecute to call a script (or sendmail or DSSendMail) to send the appropriate email. You'd have to handle the 'attaching' of the actual output file yourself.
If you are using a Sequencer job to control all this, something similar. A Routine Activity stage could call a generic routine (one that you write) to get that same link row count from the previously run job. Then a trigger from that stage could be linked to a Notification Activity stage when the return count is greater than zero. DataStage 7.5 supports attachments in the Notification Activity stage, so that part becomes even easier if you have that version. Otherwise, you'll need to fall back on the 'attach it yourself' scenario.
A couple of approaches to ponder...
(waves at Arnd who snuck in while I was typing)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
{waves back at Craig from the other side of the big pond} Much better answer than mine!
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Re: Email from DS stage
OR
create a sequential file with the color code = red .
Then write a routine to count the no of rows in that file.
From the Routine Activity call this routine and if Return Value is >=0 call Notification Activity.
Then u wil be all set
Thanks
create a sequential file with the color code = red .
Then write a routine to count the no of rows in that file.
From the Routine Activity call this routine and if Return Value is >=0 call Notification Activity.
Then u wil be all set
Thanks
hari wrote:Hi ,
Is there any way to send email from DS based on some condition? For ex. I have to check color code condition for each record. if color code is 'red' then i have to send an one email with all records with colour code 'red'
Thanks in advance..
Hari