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

Hello everyone,

 

I am encountering a problem of sending email to multiple recipients when I was using SAS DI - Data Validation.

 

sas.jpg

 

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Quentin
Super User

@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.

 

BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

View solution in original post

7 REPLIES 7
LinusH
Tourmaline | Level 20

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.

Data never sleeps
SaiPotluri
Fluorite | Level 6

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.

Quentin
Super User

@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.

 

BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
SaiPotluri
Fluorite | Level 6

@Quentin  Yes, that's right. We don't really need the macro quoting. 

 

 

R_Chung
Quartz | Level 8
What is macro quoting
R_Chung
Quartz | Level 8
As I am using DI Studio, so i have tried this method before but seems fail
Quentin
Super User

Do you get an error message in the log? 

BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

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
  • 7 replies
  • 2180 views
  • 0 likes
  • 4 in conversation