DATA Step, Macro, Functions and more

How to icrease the record length in Filename Statement for email

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 10
Accepted Solution

How to icrease the record length in Filename Statement for email

[ Edited ]

Hello I am using the below code to send email but it throws a truncation warning and email failed to send. Looks like filename only takes record length of 256 .Can you please help to increase the length.Thank you

 

%Macro FinalEmail1();
options emailsys=smtp emailhost=one.two.com emailport=25;

filename mymail email To = ("psivxaXXXXXX@Repl.com" "XXXXXXXXAVVVVV@Repl.com" "XXXXXAAAAAA@Repl.com" "XXXXXXXAXXXAAAAA@Repl.com") From = "X@Repl.com" subject="REPORT Address Weekly - CUST-Address SUCESS XXXXXX" attach = ("C:\Internal\Auto\Weekly\Logs\NECT-Address.log" LRECL=32727);

Data _Null_;
 File MyMail;
 Put ;
 Put "&FinalMessage_Address";
 Put ;
Run;
%Mend;

 

 

Error :

128        %Macro FinalEmail1();
129        options emailsys=smtp emailhost=one.two.com emailport=25;
130       
WARNING: Truncated record.

filename mymail email To = ("psivxaXXXXXX@Repl.com" "XXXXXXXXAVVVVV@Repl.com" "XXXXXAAAAAA@Repl.com" "XXXXXXXAXXXAAAAA@Repl.com") From = "X@Repl.com" subject="REPORT Address Weekly - CUST-Address SUCESS XXXXXX" attach = ("C:\Internal\Auto\Weekly\Logs\NECT

 

 


Accepted Solutions
Solution
‎05-04-2017 01:19 PM
Super User
Posts: 6,936

Re: How to icrease the record length in Filename Statement for email

Split the statement over several lines. Also makes the code more readable.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Solution
‎05-04-2017 01:19 PM
Super User
Posts: 6,936

Re: How to icrease the record length in Filename Statement for email

Split the statement over several lines. Also makes the code more readable.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 10

Re: How to icrease the record length in Filename Statement for email

Ok thanks.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 114 views
  • 1 like
  • 2 in conversation