Hi Team,
Written a below code and getting ERROR: "An invalid parameter was specified. Could you please help me?
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.
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!
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.
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;
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!
Thanks for the help.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.