Several of my emails created from SAS using ODS have "<TD>" inserted in what appears to be random locations in the report table. What am I missing here?
This is snipped from the code:
ods MARKUP body=EMLOUT3 (no_top_matter no_bottom_matter) |
anchor='report' |
tagset=CHTML |
style=styles.minimal |
; |
proc report data=npcp nowindows; |
column STIME SYSTEM JOB SRVCLSS USID |
; |
define STIME /format=time8. 'Time'; |
define SYSTEM / format=$4. 'System'; |
define JOB / format=$8. 'Job'; |
define SRVCLSS / format=$8. 'Service Class'; |
define USID / format=$8. 'User Id'; |
run; |
ods MARKUP close; |
run; |
DATE: MAY...
7:15:51 | CPU1 | CIBFANT | NCAPAR01 | ECPU1M01 |
7:23:59 | CPU2 | CITFAPS | NCAPAR01 | STC22041 |
7:24:01 | CPU2 | CITPSC1 | NCAPAR01 | STC22041 |
8:29:03 | CPU8 | CITORDC | NCAPAR01 | STC27458 |
8:37:11 | CPU8 | CITORDI | NCAPAR01 | ECPU8M01 |
8:37:13 | CPU8 | CITORDM | NCAPAR01 | ECPU8M01 |
8:39:14 | CPU8 | CITORDF | NCAPAR01 | STC27458 |
8:39:15< TD>CPU8 | CITORDJ | NCAPAR01 | STC27458 | |
20:08:31 | CPU8 | CITORDR | NCAPAR01 | STC27492 |
In case this is getting truncated, try adding the RS=NONE option to the ODS statement.
<TD> = Table Deliniator. The should be resolving by the interpretor as the time to move over to the next column. Its odd that you have it just once, is there anything in the data of 8:39:15 or CPU8 which may interfere with the encoding such as special characters?
Not that I know of. The data looks like the rows above. The code is running on z/OS 1.13 & SAS 9.1 and sending email to MS Outlook 14...
In case this is getting truncated, try adding the RS=NONE option to the ODS statement.
I take it EMLOUT3 is a filename using the email access method? You may need to add lrecl= there.
Sometimes when debugging email problems, I find it easier to write the results to a file, so that I can review the .html in a text editor. And try opening it in a browser. That helps determine whether PROC REPORT is generating bad html, or if good html genereated by PROC REPORT is being truncated by outlook or elsewhere in the emailing process.
I've been saved by rs=none, as Chevell suggests.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.