Hello!
I have a question.
In my table SAS, the column CODE_PRODUIT hase the values: CD1, CD2, CD3, CD4. This values can change.
I would like that this values appear in my e-mail, like this:
FILENAME outmail EMAIL SUBJECT= "PRODUCT" type='text/html'
FROM= ‘XXXX’
TO= (‘XXXX’‘XXXX’)
CC=(‘XXXX’)
data _null_;
file outmail;
if _N_=1 then
do;
PUT '<html>'"Hello,"'</html>';
PUT '<html>'"The values are:"'</html>';
PUT '<html>'"-CD1"'</html>'; /***new line***/
PUT '<html>'"-CD2"'</html>'; /***new line***/
PUT '<html>'"-CD3"'</html>'; /***new line***/
PUT '<html><br></html>';
end;
run;
My question is: do you know some option to resolve the macro variable in html message?
My code doesn't work: I can't resolve the macro variable &liste_PRODUIT2. in my e-mail:
data CODE_PRODUIT2;
set CODE_PRODUIT;
code_1="PUT'<html>'";
code_2=quote('A0'x||'A0'x||'A0'x||("-")||(CODE_PRODUIT));
code_3="'</html>';";
CODE_PRODUIT_2=compress(code_1||code_2||code_3);
run;
proc sql noprint;
select distinct strip(CODE_PRODUIT_2) into :liste_PRODUIT2 separated by ''
from CODE_PRODUIT2;
quit;
%put "&liste_PRODUIT2.";
data _null_; file outmail;
if _N_=1 then do;
PUT '<html>'"Hello,"'</html>';
PUT '<html>'"The values are:"'</html>';
PUT '<html><br></html>'; %put &liste_PRODUIT2. PUT '<html><br></html>'; PUT '<html><br></html>'; PUT '<html><br></html>'; end; run;
Thank ypu for you help!
... View more