Hello everyone,
I am encountering a problem of sending email to multiple recipients when I was using SAS DI - Data Validation.
If I want to do the multiple recipients, what should I need to type?
I have tried:
1. abc@xxxmail.com efg@xxxmail.com
2. abc@xxxmail.com, efg@xxxmail.com
3. abc@xxxmail.com; efg@xxxmail.com
4. 'abc@xxxmail.com' 'efg@xxxmail.com'
5. 'abc@xxxmail.com', 'efg@xxxmail.com'
6. 'abc@xxxmail.com'; 'efg@xxxmail.com'
7. "abc@xxxmail.com" "efg@xxxmail.com"
8. "abc@xxxmail.com", "efg@xxxmail.com"
9. "abc@xxxmail.com"; "efg@xxxmail.com"
They don't work. Is there any suggestions?
@SaiPotluri do you really need the macro quoting? I would think:
%let email_address = ("abc@xxxmail.com" "efg@xxxmail.com" "abc@xxxmail.com" "efg@xxxmail.com");
Would do the same thing. Since you don't have unmatched quote marks or unmatached parentheses, I don't think you need the macro quoting.
I don't have DI Studio at my fingertips to check.
But as always with DIS, look at the generated code to get a clue on how to enter things.
As I recall it, I think that we referred to a mail group instead. I think that is also better, so you don't build in hard coded "data" into the ETL jobs.
You may create a variable in the SAS Job Pre-code as follows and use that in the Data Validation Transformation Email Adress.
%let email_address = %str(%(%"abc@xxxmail.com efg@xxxmail.com%" %"abc@xxxmail.com efg@xxxmail.com%"%));
use &email_address. in the Data Validation Transformation Email Address
I would suggest to create a SAS Macro which assigns different email adresses based on the environment and call that in the SAS ETL Job pre-code and use the &email_address. where ever it is needed.
Thanks,
Sai.
@SaiPotluri do you really need the macro quoting? I would think:
%let email_address = ("abc@xxxmail.com" "efg@xxxmail.com" "abc@xxxmail.com" "efg@xxxmail.com");
Would do the same thing. Since you don't have unmatched quote marks or unmatached parentheses, I don't think you need the macro quoting.
Do you get an error message in the log?
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.
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.