Hi Team ,
Please help to send bulk PDF file . below code I'm using
%macro Mail_S;
%if &cnt %gt 0 %then %do;
OPTIONS EMAILSYS=SMTP EMAILHOST=XXXXXXXXXXX EMAILID="Analytics@cat.com";
FILENAME BLAT EMAIL
FROM = ( "Analytics@cat.com" )
TO = ( "Analytics@cat.com" )
SUBJECT = ( "New Order (&sysdate9.)")
ATTACH = ( &cat. ct='application/octet-stream' )
TYPE = "TEXT/HTML"
;
DATA _NULL_;
FILE BLAT;
PUT '<HTML><BODY>';
put "Analytics<BR><BR>";
put '</BODY></HTML>';
run;
%end;
%mend Mail_s;
%mail_s;
Please run the code with
options mlogic mprint symbolgen;
and post the complete log using this button:

@Sharath_naik wrote:
Hi Team ,
Please help to send bulk PDF file . below code I'm using
%macro Mail_S;
%if &cnt %gt 0 %then %do;
OPTIONS EMAILSYS=SMTP EMAILHOST=XXXXXXXXXXX EMAILID="Analytics@cat.com";
FILENAME BLAT EMAIL
FROM = ( "Analytics@cat.com" )
TO = ( "Analytics@cat.com" )
SUBJECT = ( "New Order (&sysdate9.)")
ATTACH = ( &cat. ct='application/octet-stream' )
TYPE = "TEXT/HTML";
DATA _NULL_;
FILE BLAT;
PUT '<HTML><BODY>';
put "Analytics<BR><BR>";
put '</BODY></HTML>';
run;
%end;
%mend Mail_s;%mail_s;
Your code does not mention PDF anywhere. So why is the subject about PDF???
If you have the macro variable &cat hiding the name of a PDF document then you should show us the values of &cat and where they come from. Not to mention &cnt. When macro variables other than SAS system variables just appear in the middle of code and not passed as parameters you might be having issues with scope of macro variables, i.e. where they are accessible
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.