Is it possible to use a macro to send out an e-mail notification?

Database
Enthusiast

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

Tags (3)
2 REPLIES
Enthusiast

Re: Is it possible to use a macro to send out an e-mail notification?

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

Junior Contributor

Re: Is it possible to use a macro to send out an e-mail notification?

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