BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi. I'm getting a new error that popped up out of nowhere today, and it seems to appear after sending an email. I believe it may be a column issue. I found that in my email, if my proc report contains more than one column, I get the error. Only one column does not give the error. Also, if I remove the RS=NONE option in my ODS HTML statement, the error goes away. However, the email text looks huge without that option, and I think there are other reasons why I need that option. Here's a basic example of a test email I sent and the log:

%Macro SendEmail;

filename custmail email emailsys=SMTP
to="Jason.Skinner@icpusa.com"
from=('Jason.Skinner@icpusa.com')
subject="test email"
content_type="text/html";

ODS HTML
body=custmail style=jasonstyle rs=none;
proc report data = as400.newcustnos ;
column (bname sname);
define bname / group left 'Distributor Name';
define sname / group center 'RBM Name';
title "&NewCustnos New Account(s)";
footnote;run;
ODS HTML CLOSE;run;quit;

%Mend SendEmail;

%SendEmail;

Here's the Log:

NOTE: Remote submit to SERVER commencing.
2293 %Macro SendEmail;
2294 filename custmail email emailsys=SMTP
2295 to="Jason.Skinner@icpusa.com"
2296 from=('Jason.Skinner@icpusa.com')
2297 subject="test email"
2298 content_type="text/html";
2299
2300 ODS HTML
2301 body=custmail style=jasonstyle rs=none;
2302 proc report data = as400.newcustnos ;
2303 column (bname sname);
2304 define bname / group left 'Distributor Name';
2305 define sname / group center 'RBM Name';
2306 title "&NewCustnos New Account(s)";
2307 footnote;run;
2308 ODS HTML CLOSE;run;quit;
2309
2310 %Mend SendEmail;
2311
2312 %SendEmail;
NOTE: Writing HTML Body file: CUSTMAIL

NOTE: There were 120 observations read from the data set AS400.NEWCUSTNOS.
NOTE: The PROCEDURE REPORT printed page 214.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds


ERROR: Invalid number.
NOTE: Remote submit to SERVER complete.


Also, here's a snippet of log text from another job where this error causes SAS to stop processing everything else. Everything afterward just completely bombs, which is a major problem. The conversion errors have been there forever and don't cause problems.


NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).
1:16 1:16 1:16 1:16 1:16 1:16 1:16 1:16 1:16 1:16 1:16 1:16 1:16 1:16 1:16 1:16
1:16
NOTE: Unable to find the "NoteContent" style element. Default style attributes will be used.
NOTE: There were 40 observations read from the data set MASTERS.WARRANTYDAILY.
WHERE (WA='JW') and (status='M') and (claimtype='UNITR');
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.12 seconds
cpu time 0.12 seconds


ERROR: Invalid number.
NOTE: Writing HTML Body file: WAMAIL

NOTE: The SAS System stopped processing this step because of errors.
NOTE: SAS set option OBS=0 and will continue to check statements. This may cause NOTE: No observations in data set.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
2 REPLIES 2
deleted_user
Not applicable
By the way, I'm using version 9.1.3 SP3. As a short-term workaround, is there an option or something I could use after the email part of the code that would make SAS start processing again? That is, after it hits the error and decides to stop processing, thereby causing all remaining code to bomb, is there something I could do to tell it to wake up and start processing again? Thanks!
deleted_user
Not applicable
FYI, if you ever see a problem like this, check for viruses. We found two viruses (Lovegate and Bugbear) on our server that were interfering with the email service. After cleaning and re-booting, the emails are working properly again. Message was edited by: JasonTSkinner

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 873 views
  • 0 likes
  • 1 in conversation