BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
DavidCaliman
Calcite | Level 5

I can send email via the Job status handling.

If an error occurs in the job, I need to pass the job name in the message of the email.

How to do it within the handling status of a job?

Searching on google, I see that there is a variable called ETLS_JOBNAME.

And in the code generated by the DI, the following command sends the message of the email:

      data _null_;

                       file sendMail;

                       dttm = put(datetime(),nldatm.);

                       put dttm "&message.";

        run;

1 ACCEPTED SOLUTION

Accepted Solutions
Patrick
Opal | Level 21

&ETLS_JOBNAME gets defined as global macro variable. It should therefore be possible to pass this macro variable as message value.

Capture.PNG

This then generates code as below:

      %etls_sendEmail

         (address = something,

          Message = &ETLS_JOBNAME);

View solution in original post

2 REPLIES 2
MikeFrost
SAS Employee

Hi David,

I don't know if you determined a resoluotion for yourself on this question or not. If not, I recommend that you reach out to SAS Technical Support and open a track to have this question addressed.

Regards,

Mike F.

Patrick
Opal | Level 21

&ETLS_JOBNAME gets defined as global macro variable. It should therefore be possible to pass this macro variable as message value.

Capture.PNG

This then generates code as below:

      %etls_sendEmail

         (address = something,

          Message = &ETLS_JOBNAME);

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1248 views
  • 1 like
  • 3 in conversation