I am running the following autoexec before calling a macro. I usually just have the output go to the default window so I am not specifying html or pdf in the code itself although it is listed in the preferences.
AUTOEXEC.SAS
%LET sasworklocation="/folders/myfolders/";
ODS LISTING GPATH=&sasworklocation;
/* ODS STATEMENTS */
ods path reset;
ods _ALL_ close;
ods trace off;
ods listing;
ods noptitle;
ods graphics on;
*INITIALIZATION
proc printto; run;
I am following the autoexec with a call to a macro but I suspect that the macro itself initiates the table of content output. That is what is happening on the code I am working with. A display of unwanted table of content data appears in the results window. How can I stop that from happening when running SAS University? It greatly increases output size. I got it to stop once when I changed the preferences but it is back in again. The following statement added to the macro does not work.
ODS html5 exclude toc
The error message says:
html5 destination is not active
I need something similar to this ???
I don't want to output to pdf or rtf for simplicity. I just want to open sas studio /sas university, code, and get output to the screen.
By the way, why am I not getting an output window as well?
Thanks. MM
The easiest thing is to use PROC DELETE if you want to delete a dataset. Then code it clearer and it runs faster.
proc delete data=work.meansout; run;
Or you could add the NOLIST option to your PROC DATASETS statement.
Did you look into the macro definition to see if it does indeed initiate the TOC? If the macro is generating code that explicitly creates a TOC, I would think the answer would be to modify the macro (perhaps add a parameter that allows you to turn the TOC on/off). If the macro does not ask for TOC, then I would look at the log to see the ODS statement generated by studio, to see if that is what is adding the TOC.
Maybe a simple test would be submit something like:
%macro printit(data);
proc print data=&data (obs=5);
run;
%mend printit;
%printit(sashelp.shoes)
%printit(sashelp.class)
If you run that, and studio creates a TOC, you will know it's not the code generated by the macro. And you'd have a simple log to look at to see what code is asking for the TOC. I haven't used Studio. I'm assuming that, similar to EG, you can set an option to make sure that the wrapper code generated by studio is shown in the log.
The last picture that you copied into a PDF and then attached (why not just use the Insert Photo icon on the editor to put the picture in your post?) is the output of PROC CONTENTS.
Find where the PROC CONTENTS code is. If you need it to produce an output dataset you can add the NOPRINT option to stop it from also producing the report. If you don't need it to produce an output dataset then just remove it.
proc contents data=sashelp.class out=contents noprint;
run;
The CONTENTS statement inside of PROC DATASETS can generate PROC CONTENTS output also.
The easiest thing is to use PROC DELETE if you want to delete a dataset. Then code it clearer and it runs faster.
proc delete data=work.meansout; run;
Or you could add the NOLIST option to your PROC DATASETS statement.
It is right on the menu when editing your post. Along with the Insert Code and Insert SAS Code buttons.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.