All Forums Database
rmline 5 posts Joined 09/12
15 Oct 2012
Is it possible to use a macro to send out an e-mail notification?

Hi all;
 
I am doing some error checking / monitoring and was wondering is it possible to have a Marco set up to send out an e-mail notification if a certain set of circumstances have occured.  Does anyone have any insight on this?
I was thinking it would work somethink like this.
 creat macro ETL_JOB_TRACK
    (select    END_DTTM from DBQL
IF  END_DTTM < Current
send e-mail)
 
Thanks

suresh1802 8 posts Joined 10/12
16 Oct 2012

Hi,
 
I was just wondering why do you want to use macro, is ther any specific reason for this ?
Because I have handled such things in after bteq script in the master job using shell script (UNIX)...if using macro is not ur constraint then
you can handle this using UNIX shell programming after your bteq script in Main job.
 
Regards,
Suresh

dnoeth 4628 posts Joined 11/04
16 Oct 2012

If you can't do it in a Unix shell you have to write a XSP for the mail part, in the appendix of the "SQL External Routine Programming" there's an example for that.
And because Macro's don't support IF you have to move the logic into a Stored Procedure.
Dieter

Dieter

You must sign in to leave a comment.