Sas email line length not long enough?

Accepted Solution Solved
Reply
Super Contributor
Posts: 418
Accepted Solution

Sas email line length not long enough?

Hello everyone.  I have an email that I sent out that is using the CT='text/html' methodology. A problem arises in that one of the lines that is being "put" is too long, so the program seems to be cutting it off at an Unknown value.  As such, the first <a href> is not closing, and the entire email is being colored in hyerlink text..

Only the correct words "madeupclient - madeupservicer Population File"  are being actually hyperlinked, however the entire email looks in the blue "hyperlink" color.  I am not sure how to solve this problem.

Is there an option like "lrecl" for the Put option in an email body that wil allow the lines to grow longer so they are not forced to wrap?

P.S. I know it is a length problem becasue if the exact same code is run on a file in a short directory path it works correctly. However I cannot change the directory path (I didn't set them up and they need to be this long.... I know they're longer than what is ideal).

I have attached a copy of it below.


FILENAME outmail EMAIL  SUBJECT="madeupclient - madeupservicer Population
                             File Loaded With Errors" FROM= "MYEMAIL" TO=
                             ("destinationEmail") CT='text/html' ;
DATA _NULL_;
FILE outmail;
PUT "The <a href='\\Shares\CFIS\Denver\BAC\Analytics\File Review Random Sampling\Made up client name\MadeupServicer\Population Input\2015-03-31\Archive\Completed with Errors\MadeupServicerMarch Sampling Tool v15-03a v2.xlsx'>madeupclient - madeupservicer Population File</a>";
put " for 2015-03-31 has finished it's attempted load but has found errors. Please see list of errors found below to fix and re-run the file<br><br>";
put "<b><u>Misnamed Module Tab Errors</b></u><br>";
PUT "The madeupclient - madeupservicer process has found at least 1 tab with an incorrect naming.";
PUT "The process is forced to stop for these tabs. Please review the tab, make the necessary changes, and ";
put "re-save the Excel file to the correct input folder so the process can be re-run. <br><br>";
put "The Errors can be found here <a href='\\Shares\CFIS\Denver\BAC\Analytics\File Review Random Sampling\madeupclient\madeupservicer\Validations\TablvlValidations.xlsx'>Tab Name Errors</a><br><br>";
put "<b><u>File Structure Errors</b></u><br>";
PUT "The madeupclient - madeupservicer process has found at least 1 Module tab with a misnamed or missing Column.";
put "<br><br>" ;
PUT "Please see the validation file located <a href='\\Shares\CFIS\Denver\BAC\Analytics\File Review Random Sampling\madeupclient\madeupservicer\Validations\FilestructureErrors.xlsx'>here</a> for the incorrect columns";
PUT "and re-save the Excel file to the correct input Folder to re-run the process once the file has been fixed.<br><br>";
put "<b><u>Successful Modules Loaded</b></u><br>";

put "Please note the <a href='\\Shares\CFIS\Denver\BAC\Analytics\File Review Random Sampling\madeupclient\madeupservicer\\Population Input\2015-03-31\Output Files\CorrectModulesLoaded_2015-04-09_15_36_54.xlsx'>following</a> Modules were correctly loaded from this population file.";
put " If you attempt to re-load the file, make sure to remove these modules First.<br><br>";
RUN;


Accepted Solutions
Solution
‎04-10-2015 02:16 AM
Super User
Posts: 7,422

Re: Sas email line length not long enough?

Try the lrecl= option in the filename or the file statement; the default lrecl for filename email is 256, and your line is longer than that.

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

View solution in original post


All Replies
Solution
‎04-10-2015 02:16 AM
Super User
Posts: 7,422

Re: Sas email line length not long enough?

Try the lrecl= option in the filename or the file statement; the default lrecl for filename email is 256, and your line is longer than that.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super Contributor
Posts: 418

Re: Sas email line length not long enough?

Maybe a dumb question but how does one specify the LRECL within a "file" that is an email file.

when I try this..

FILENAME outmail  EMAIL  SUBJECT="madeupclient - madeupservicer Population

                             File Loaded With Errors" FROM= "MYEMAIL" TO=

                             ("destinationEmail") CT='text/html'  LRECL=999 ;

I actually get an error saying "Option LRECL is knot known for filename".  If I put it before the EMAIL option it doesn't recognize the "EMAIL" part.

Valued Guide
Posts: 3,208

Re: Sas email line length not long enough?

file statement?

---->-- ja karman --<-----
Super Contributor
Posts: 418

Re: Sas email line length not long enough?

Oh you mean in the File option within the email itself. I will try that i'm sorry for the confusion! Sorry for the overly simplistic question. I am still very "new" to outputting files with the put option!

Respected Advisor
Posts: 3,786

Re: Sas email line length not long enough?

What version of SAS and OS?  I ran your program using UNIX SAS 9.3 and LRECL works on FILENAME statement.

🔒 This topic is solved and locked.

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

Discussion stats
  • 5 replies
  • 297 views
  • 3 likes
  • 4 in conversation