You might be too young to remember Clara Peller. She was the star of a series of fast-food burger commercials in the 1980s, in which she demanded meatier meals by shouting "Where's the beef?" at the pickup counter or drive-through window. Alas, the competitor restaurant meals were afflicted with "Fluffy bun", meaning that it was difficult to find the all-beef patty because it was dwarfed by the bread in which it was served.
SAS Enterprise Guide can also serve up some meaty content in the SAS log when you run a SAS program. But in order get that content to you from your SAS session, SAS Enterprise Guide wraps your program in what we call the "ODS sandwich" -- SAS statements that open and close one or more ODS destinations around your program, so that your results can be packaged from SAS and delivered into your project view.
Sometimes, the ODS sandwich can obscure the content that you're really interested in. Consider this log:
1 ;*';*";*/;quit;run; 2 OPTIONS PAGENO=MIN; 3 %LET _CLIENTTASKLABEL='Program'; 4 %LET _CLIENTPROJECTPATH=''; 5 %LET _CLIENTPROJECTNAME=''; 6 %LET _SASPROGRAMFILE=; 7 8 ODS _ALL_ CLOSE; 9 OPTIONS DEV=ACTIVEX; NOTE: Procedures may not support all options or statements for all devices. For details, see the documentation for each procedure. 10 GOPTIONS XPIXELS=0 YPIXELS=0; 11 FILENAME EGSR TEMP; 12 ODS tagsets.sasreport12(ID=EGSR) FILE=EGSR STYLE=Analysis 12 ! STYLESHEET=(URL="file:///C:/Projects/f2ec43/winclient/Build/Debug/Styles/Analysis.css") NOGTITLE NOGFOOTNOTE 12 ! GPATH=&sasworklocation ENCODING=UTF8 options(rolap="on"); NOTE: Writing TAGSETS.SASREPORT12(EGSR) Body file: EGSR 13 14 GOPTIONS ACCESSIBLE; 15 proc means data=sashelp.cars; 16 class origin; 17 run; NOTE: There were 428 observations read from the data set SASHELP.CARS. NOTE: PROCEDURE MEANS used (Total process time): real time 0.16 seconds cpu time 0.04 seconds 18 19 GOPTIONS NOACCESSIBLE; 20 %LET _CLIENTTASKLABEL=; 21 %LET _CLIENTPROJECTPATH=; 22 %LET _CLIENTPROJECTNAME=; 23 %LET _SASPROGRAMFILE=; 24 25 ;*';*";*/;quit;run; 26 ODS _ALL_ CLOSE; 27 28 29 QUIT; RUN;
There are only a few lines of interest here, but lots of fluff. It's necessary fluff, mind you. Just like you wouldn't want the fast-food restaurant to hand over your burger (and all the fixins) without a bun, you need to use ODS to deliver your output. But it's not what you came for.
In SAS Enterprise Guide 4.2 and 4.3, you can change an option to hide the fluff in your log. Select Tools->Options and go to the "Results General" page. See the checkbox option that says "Show generated wrapper code in SAS log"? If you clear that checkbox, the ODS sandwich will be hidden from you when you run your programs. (If you're curious how this works, this is the technique that we use.)
Here's the previous example with this option cleared, sans the fluffy ODS bun:
1 ;*';*";*/;quit;run; 2 OPTIONS PAGENO=MIN; 3 %_eg_hidenotesandsource; 18 19 proc means data=sashelp.cars; 20 class origin; 21 run; NOTE: There were 428 observations read from the data set SASHELP.CARS. NOTE: PROCEDURE MEANS used (Total process time): real time 0.04 seconds cpu time 0.06 seconds 22 23 %_eg_hidenotesandsource; 35 36 37 QUIT; RUN;
Look carefully at the log. You'll notice that the line numbers are not consecutive -- it skips a few! That's because the ODS statements are still submitted and processed, but the log output for those statements is suppressed. The result is a cleaner log, with more meat than fluff.
We know that many programmers work in regulated industries, and aren't permitted to suppress portions of the SAS log like this. That's why the option is set to "show all" by default. But if you're in search of "just the beef", give this handy option a try.
12 Comments
That's a yummy tip, even from those of us who prefer veggie burgers.
I often run with OPTIONS NONOTES, which further streamlines the log. Is there an automatic way to submit this option?
There isn't an automatic way to submit NONOTES in EG; it's the sort of thing you would want to be deliberate about, I think, since sometimes the notes are useful and relevant. We don't just write them for our own amusement, you know!
You can always submit OPTIONS NONOTES from a program node first thing, and then enjoy a note-free session until next time you restart EG or reconnect to your SAS session.
Hi Chris,
I am just curious to know what system file in SAS EG is creating all that fluff in the log and that too each time a program is submitted in EG?Can i locate this file?
Thanks,
There isn't a central file that controls this. The options in Tools->Options->Results control which ODS statements are added to the program when you submit. These preferences control the behavior; there isn't a config file that you can edit, if that's what you're looking for.
In SAS EG is there a way to get rid of the %LET macro variable assignments when you export a code/task node to SAS code?
I have pasted the resulting .sas code below from a simple proc print:
%LET _CLIENTTASKLABEL='Program to export';
%LET _CLIENTPROJECTPATH='C:\NotBackedUp\sas_project_temp.egp';
%LET _CLIENTPROJECTNAME='sas_project_temp.egp';
%LET _SASPROGRAMFILE=;
GOPTIONS ACCESSIBLE;
proc print data=sashelp.class;
run;
GOPTIONS NOACCESSIBLE;
%LET _CLIENTTASKLABEL=;
%LET _CLIENTPROJECTPATH=;
%LET _CLIENTPROJECTNAME=;
%LET _SASPROGRAMFILE=;
No, there isn't a way to exclude those from the exported version. As you probably noticed, the Export window provides a number of options to exclude certain parts of the EG-generated code, but these minimal macro variable assignments are not controlled by any of those options -- they are always part of the export result.
Pingback: SAS Enterprise Guide options: my favorite 5 - The SAS Dummy
Do you know of anyway to increase the Project Log notification size so it doesn't prompt you with "The Project log is too big." everytime you run something. I like to keep as much log history as possible but I don't want to save the log then have to clear it each time it gets full. To me 5megs is nothing. If you know a way to increase the default awesome. Thanks.
Jim,
There is a way - it's a bit secret.
In your EG installation folder you'll find SEGuide.exe.config. Edit that file to include this section:
The number is expressed in BYTES. By default it's 5 million (or about 5MB).
Pingback: Take control of ODS results in SAS Enterprise Guide - The SAS Dummy
We get a very long log when we insert the data into sql tables, because the log contains a huge number of rows 'OLEDB: Called InsertRow(FastLoad)'. Do you know if it is possible to hide them from the log?
I don't know if NONOTES NOSOURCE will affect these types of messages. If not, reach out to SAS Tech Support for guidance. Another approach might be to redirect the log with PROC PRINTTO for this portion of processing...if you don't need any of the log content from that bit.