Write and run SAS programs in your web browser

Customize the note/warning/error list in SAS/Studio log review

Reply
Super User
Super User
Posts: 6,142

Customize the note/warning/error list in SAS/Studio log review

Is there anyway to enhance the list of NOTES/WARNINGS/ERRORS that SAS Studio displays at the top of the log to include special searches for notes that most production shops treat as errors?  Such 'unitialized' variables or multiple datasets with repeating by group values?

Trusted Advisor
Posts: 1,189

Re: Customize the note/warning/error list in SAS/Studio log review

The undocumented note2err system option could help.  It forces the uninitialized note to become an error.  Unfortunately doesn't seem to effect the multiple datasets with repeating by values.

 

I haven't tried it in SAS studio, but assume it should work in any client. 

 

82   options dsoptions=note2err;
83
84   data want;
85     z=notthere;
86   run;

ERROR: Variable notthere is uninitialized.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.WANT may be incomplete.  When this step was stopped there were 0
         observations and 2 variables.
WARNING: Data set WORK.WANT was not replaced because this step was stopped.

87
88
89   data have;
90     id=1;
91     output;
92     output;
93   run;

NOTE: The data set WORK.HAVE has 2 observations and 1 variables.

94
95   data want;
96     merge have have;
97     by id;
98   run;

NOTE: MERGE statement has more than one data set with repeats of BY values.
NOTE: There were 2 observations read from the data set WORK.HAVE.
NOTE: There were 2 observations read from the data set WORK.HAVE.
NOTE: The data set WORK.WANT has 2 observations and 1 variables.
Super User
Super User
Posts: 6,142

Re: Customize the note/warning/error list in SAS/Studio log review

[ Edited ]

Thanks, but I was thinking more of an enhacement to the SAS Studio itself rather than changing the SAS code that is running.

So now there is a search for three types of records.

Capture.PNG

So perhaps a way to add a fourth category say,Customized, that includes a method for the user to set the rules to define the set of lines that the customized search would find.  Then they could appear at the top of the log and become links to jump to location in the log where they appear.

Or a way to modify the current rules that are used to location ERROR lines to include some other lines as "errors".

 

Trusted Advisor
Posts: 1,189

Re: Customize the note/warning/error list in SAS/Studio log review

Understood, and agree. The ability to customize how the log parser works would be nice. Perhaps specify a list of messages (with wildcards or whatever) to be caught.
SAS Employee
Posts: 36

Re: Customize the note/warning/error list in SAS/Studio log review

This is a great candidate for the SASware Ballot. The Studio and EG teams meet regularly to go over any requests that appear in the ballot. We review the requests and then respond so that you and others can track its status. It is also a way for others to jump in and add their muscle to the request. The more votes a request gets the more likely it will be addressed sooner than later. As a general post it will not follow the same rigorous workflow and great ideas will potentially get lost. Hope that is motivation enough to use the ballot system :-) 

Trusted Advisor
Posts: 1,189

Re: Customize the note/warning/error list in SAS/Studio log review

Good point @samdupont.  Glad to hear that developers find the SASware ballot input useful.  I noticed that they started attaching status codes whch provide feedback on suggestions, which I think is great.  Any chance you could ask someone to assign a status to the Batch Submit button item: https://communities.sas.com/t5/SASware-Ballot-Ideas/Add-BATCH-SUBMIT-button-to-EG/idi-p/219640  .  I think it's still the top-voted EG item, and it's been out there a while. : )

SAS Employee
Posts: 36

Re: Customize the note/warning/error list in SAS/Studio log review

:-)  It's at the top of the list to review. Look for a future update. 

Ask a Question
Discussion stats
  • 6 replies
  • 75 views
  • 2 likes
  • 3 in conversation