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

Hi Team,

Written a below code and getting ERROR: "An invalid parameter was specified. Could you please help me?

 %let to=rinusjoseph@gmail.com

filename mail email 'Nul';

data _null_;

file mail;

subject=test mail;

tolist=tranwrd(trim('('||quote(&to) ||')').';','"");

msg=&msg;

sign=&sign;

put '!EM_to!' tolist;

run;

 

ERROR:An invalid parameter was specified.

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Please use the code window - its the {i} above post area, to make your code more readable.  What is the 'nul' for in the email filename statement?  You must put a valid email there, thats the point of email?

filename mail email 'someone@somewhere.com' subject="no data to be send";

data _null_;
  file mail;
  name="abc@gmail.com";
  put '!EM_TO!' name;
run;

Note where the subject goes, and that an email is given - the name in your datastep is just a string value!

View solution in original post

4 REPLIES 4
Kurt_Bremser
Super User

The %let is never ended with the necessary semicolon.

 

You have unbalanced quotes in your code, look at the coloring supplied by the Enhanced Editor.

 

You define three variables in the data _null_ (subject, msg and sign) which you never use.

 

When setting subject, you have a syntax error because of missing quotes. The same will probably be true for msg and sign.

 

Fix one issue after another, so you get the data step right before dabbling with emails.

Keep in mind that subject= should be part of the filename email statement.

rinsabraham
Obsidian | Level 7

ok Thanks for your reply.

 

I have done the modification to my code please refer the below code still getting same issue.

 

filename mail email 'Nul';
data _null_;
file mail;
subject="no data to be send";
name="abc@gmail.com";
  put '!EM_TO!' name;
  run;

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Please use the code window - its the {i} above post area, to make your code more readable.  What is the 'nul' for in the email filename statement?  You must put a valid email there, thats the point of email?

filename mail email 'someone@somewhere.com' subject="no data to be send";

data _null_;
  file mail;
  name="abc@gmail.com";
  put '!EM_TO!' name;
run;

Note where the subject goes, and that an email is given - the name in your datastep is just a string value!

rinsabraham
Obsidian | Level 7

Thanks for the help.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 2715 views
  • 1 like
  • 3 in conversation