BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
G_I_Jeff
Obsidian | Level 7

Had to change email system to CSSMTP for security reasons and and now getting &nbsp characters after line breaks in email body. Utilizing ODS HTML3 with style=sasweb. I've played around with different ODS destinations, styles and options and cannot seem to make it disappear. Anyone have any ideas?

 

Untitled.png

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Why are you writing HTML as fixed length 80 byte records (card images)?

I suspect it is having to flow the code into such a cramped format that is causing extra spaces to make their way into the generated HTML.

View solution in original post

6 REPLIES 6
Cynthia_sas
SAS Super FREQ
Hi:
That's very odd. It almost looks like there's a space between the 's' and the 'p' in ' ' in your screen shot. Just as a test, does the same thing happen if you use HTML4 or HTML5? This might be something you need to work on with Tech Support. If you are not putting '&nbs p;' into the program, then there may be some bug in the HTML3 destination code in ODS.
Cynthia
G_I_Jeff
Obsidian | Level 7

Cynthia,

 

Different HTML destinations do remove it, but change the body formatting of the email drastically:

HTML4

HTML4.jpg

 

HTML5
HTML5.png

 

I don't know enough about how styles work with different HTML outputs.

Jeff

G_I_Jeff
Obsidian | Level 7

I forgot to mention, there also looks like a space in the word February in the title that wasn't there before.

G_I_Jeff
Obsidian | Level 7
filename myfile email                                        
    to=("xxxxxxxx@usda.gov")                             
    from=("xxxxxxxx@usda.gov")                          
    sender=("xxxxxxxx@.usda.gov")                        
    replyto=("xxxxxxxx@usda.gov")                   
    subject="DISC daily mainframe metrics"                   
    type="text/html"                                         
    sysout=b                                                 
    pgm=ktcpsmtp                                             
    encoding=ascii                                           
    lrecl=80                                                 
    blksize=80                                               
    recfm=fb;                                                
run;                                                         
                                                             
ods html3 body=myfile rs=none style=sasweb;                  
                                                             
proc print data=work.plat noobs;                             
 var cecser minpltbusy avgpltbusy maxpltbusy                 
     minzipbusy avgzipbusy maxzipbusy;                       
 where system='SYSA';                                        
 title1 j=left c=black height=6pt                            
        "Here are the daily metrics.";      
 title2 j=left c=black height=6pt                            
        "xxxxxxxx";                                        
 title3 " ";                                                 
 title4 "&serial&type DISC frame 24hr metrics for &rptdate"; 
run;                                                         
                                                             
proc print data=work.sys noobs;                              
  by system;                                                 
 var cecser system hour minsysbusy avgsysbusy maxsysbusy     
     minzipbusy avgzipbusy maxzipbusy;                       
 title "&serial&type DISC systems 24hr metrics for &rptdate";
run;                                                         
Tom
Super User Tom
Super User

Why are you writing HTML as fixed length 80 byte records (card images)?

I suspect it is having to flow the code into such a cramped format that is causing extra spaces to make their way into the generated HTML.

G_I_Jeff
Obsidian | Level 7

This came from an example of how to use CSSMTP on the mainframe. It is passing the entire email to the CSSMTP via JES. I increased the record length and blocksize to 133 and it eliminated it. Good catch!!

sas-innovate-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.

Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1246 views
  • 0 likes
  • 3 in conversation