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?
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.