Script to send a mail to the Recipients in BTEQ...

Database
l_k
N/A

Script to send a mail to the Recipients in BTEQ...

I need to write a script for sending the ETL alerts (Success/Failure Message) to the recipients.If the loading procedure is successfully run then it should send "SUCCESS" message to the respective
recipients otherwise "FAILURE" should go out.The recipients are both our ETL support guys as well as client side BI managers.

Is there any way to write the scripts with the help of BTEQ or Teradata manager to configure this task.

If possible,then how to go ahead with this mail task?

Regards,

Lavakumar
5 REPLIES

Re: Script to send a mail to the Recipients in BTEQ...

Use unix script to invoke bteq script and get the return code of bteq script. Use unix email command to send mail based on bteq script's return code.

Re: Script to send a mail to the Recipients in BTEQ...

If you are using Mainframe JCL, you can run the batch version of BTEQ script in JCL and check the return of the bteq step. Use Mainframe email utility to trigger the mail alert.

Re: Script to send a mail to the Recipients in BTEQ...



you can try this in the BTEQ

.IF ERRORCODE <> 0 THEN .OS (call the shell/batch script for failure);

You can try the same thing for success.
l_k
N/A

Re: Script to send a mail to the Recipients in BTEQ...

Thanks for your reply...

I have one more question about this..Is there any option to do this using Teradata Manager?

Re: Script to send a mail to the Recipients in BTEQ...

informing the failure or success of a BTEQ job through Teradata Manager? I guess no.