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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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