BookmarkSubscribeRSS Feed

Please change the behavior where Enterprise Guide interprets events in the SAS log as errors that are not ERRORs in the SAS log.  "ERRORs in the SAS log" being an instance when SAS generates a log statement prefixed with the string "ERROR:".

 

Example of this behavior.  The format "gobble_dee_guk" is not defined for the purpose of this example.

 

 

/*options FMTERR;*/ 
options noFMTERR; 
data _Null_; 
  x= put (y,gobble_dee_guk.); 
  stop; 
run;

 

Without FMTERR:

29         options  NoFMTERR;
30         
31         data _Null_;
32           x= put (y,gobble_dee_guk.);
                       _______________
                       484
NOTE 484-185: Format GOBBLE_DEE_GUK was not found or could not be loaded.

33           stop;
34         run;

NOTE: Variable y is uninitialized.
NOTE: DATA statement used (Total process time):
      real time           1.11 seconds
      cpu time            0.03 seconds

 

With FMTERR:

29         options  FMTERR;
30         
31         data _Null_;
32           x= put (y,gobble_dee_guk.);
                       _______________
                       48
ERROR 48-59: The format GOBBLE_DEE_GUK was not found or could not be loaded.

33           stop;
34         run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
      real time           1.01 seconds
      cpu time            0.04 seconds

 

If this program is run in Enterprise Guide, with the format not defined, and with option NOFMTERR set, then Enterprise Guide still interprets the SAS log as having an error, despite the absence of an "ERROR" statement in the log. 

 

Capture.JPG

 

Two problems this can cause:

1. This can result in submitted code being interrupted against the wishes of the programmer. 

2. This is difficult to see or find this error in a log unless you have specific knowledge of this exception, since in the SAS log the item that clues the programmer as to what is causing the error is a "Note".

 

See this link, I have a more editorial rant here if you're interested: EG8, options NOFMTERR, and submission status error 

 

5 Comments
Quentin
Super User

Agree, that looks wrong.

 

Note that the Log Summary correctly shows 0 errors.  It's only the submission status which is wrong.

 

I guess the question is, how is EG determining submission status?  Is it using the automatic macro variable(s) syscc sysserr etc?  Is it scanning the log? Something else?

 

 

ChrisHemedinger
Community Manager

If you run this same program in SAS for Windows, you'll get a similarly formatted log -- that is, the underscore and "484" lines will be colored red, indicating that SAS has applied the "error" treatment to this information in the SAS log.

 

EG picks up on that cue when it shows whether the SAS log has errors.  SAS actually "decorates" each log line with a 2-byte prefix (which you don't see) to indicate how to color the line.  It's not relying on the word "ERROR" nor automatic macro variables -- neither of those are reliable in all cases.

 

So, I think this is maybe a bug (or just the way it works) for this condition in SAS.  Using an undefined format is considered an error...unless you have the option NOFMTERR set, in which case SAS "gives it a pass."  But....apparently it's still going to be passive aggressive about it and mutter "still an error though" under its breath.

Quentin
Super User

Thanks Chris,

I vaguely remembered that bit about log prefix lines, and that they we used for line coloring and the log summary.

 

But in this case, the log summary says 0 errors, while the submission status says "ERROR".  

 

Doesn't that suggest that the submission status is using something different than the log status?

 

(Or maybe I'm misunderstanding, I don't have recent version of EG so can't play within this new submission status).

ChrisHemedinger
Community Manager

@Quentin It might be that SAS is also returning an error code and EG picks up on that.  But I think it's more likely that EG is just assuming that the presence of one or more "error lines" indicates that, well, this job had errors.

ChrisNZ
Tourmaline | Level 20
How are variables syscc and syserr affected (sorry I can't test)?
I'd file this as a bug with tech support rather than hope it will be addressed here.