BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello,

I have been trying for a while now to ONLY get the output dataset from the proc tabulate procedure. Please note that I can get it exactly how I want it, but there is an html file output that comes along (which I don't want).

So, is there a way I can cancel that table output to only get the resulting dataset?

Thank you so much.

Samuel
9 REPLIES 9
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
It's best to share any related SAS code you are executing for this type of question/post -- also it is even better if you were to share actual SAS log (pasted in your post or reply-post) to show any SAS-generated diagnostic messages.

Scott Barry
SBBWorks, Inc.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
To start, you will want to review your SAS log processing to determine what, if any, ODS output destination is active/open. Then consider:

ODS HTML CLOSE;
..or...
ODS LISTING CLOSE;

Scott Barry
SBBWorks, Inc.
Cynthia_sas
SAS Super FREQ
Hi:
Are you by any chance using SAS Enterprise Guide? If so, the creation of HTML output is turned on by default and there's a Tools --> Options choice (inside EG) to turn off HTML output file creation.

If you are NOT using SAS EG, but are instead using SAS Display Manager to submit code, then investigate whether you have automatic HTML file creation turned on by checking this path from the Display Manager pull down menus:
Tools --> Options --> Preferences --> Results tab
make sure that the choice "Create HTML" (in the middle of the window) is UNchecked....because if it is CHECKED, then HTML file creation is automatic.

You did not say whether you were using the OUT= option or ODS OUTPUT to create the output dataset. In either case, putting ODS LISTING CLOSE; before the PROC TABULATE step will cause the LISTING window output to be suppressed.

cynthia
deleted_user
Not applicable
Hi,

I'm sorry about the lack of information in my last post.

1) I am using SAS EG (Entreprise Guide)
2) I am using the OUT= option to get my output dataset

I know I can uncheck the html output option for my SAS, but other people from my department will use the program and I don't want them to get the html output as it is unnecessary and ressource consuming.

Note : I have tried putting the ODS LISTING CLOSE as well as the ODS HTML CLOSE command, but the html output poped up anyway.

Here is a bit of my code (note that to get the base code, I copied the SAS given code from the Summary Table option in SAS EG.)

Again, thank you for your time and patience.

ODS HTML CLOSE;

PROC TABULATE
DATA=WORK.FINAL

OUT=WORK.SummaryTable1(LABEL="Summary Tables for WORK.FINAL")

;
VAR APPROVAL APPDOL2 CLAIM ARREAR CLMDOL2 RFFI APPROVAL2 APPDOL_2 CLAIM2 ARREAR2 CLMDOL_2;

CLASS LNAMORT / ORDER=UNFORMATTED MISSING;
CLASS BEACONR / ORDER=UNFORMATTED MISSING;
CLASS PERIOD / ORDER=UNFORMATTED MISSING;
CLASS PRODUCT / ORDER=UNFORMATTED MISSING;
TABLE

/* Page Dimension */

PRODUCT,

/* Row Dimension */

PERIOD*
BEACONR*
ALL,

/* Column Dimension */

LNAMORT*(
APPROVAL*
N
APPDOL2*
Sum
CLAIM*
Sum) ;
;

RUN; Message was edited by: SamuelG.
Cynthia_sas
SAS Super FREQ
Hi:
Where you have ODS HTML CLOSE; put

ODS _ALL_ CLOSE;

instead. If that does not work, you may need to work with Tech Support to get the automatic HTML file suppressed. I thought that EG opened the HTML destination without any ID= option, but if the report is popping up in HTML anyway, that must not be the case. Closing everything with the _ALL_ should work.

cynthia
_Altons_
Calcite | Level 5
Hi Cynthia,

I am having a similar problem with a macro in EG, basically my macro uses proc univariate and proc freq along with ods ouput to generate some tables. After some manipulation I use a simple proc print to display my results.

I don't want to display the Univariate and freq outputs so at the top of my macro I have an ODS _ALL_ CLOSE;
The above works fine, the issue appears when further down in my macro I need to print out a table using Proc Print;

I have tried using the
ODS Listing;
ODS Html;

The Listing displays the result but I get nothing in HTML.

Also I have tried ODS html file="test.html";

Any idea?

Thanks in advance.

Alberto Message was edited by: _Altons_
_Altons_
Calcite | Level 5
I found the solution using the ID tag;
ODS HTML(ID=EGHTML) close;
proc univariate;
proc freq;
ODS HTML(ID=EGHTML) FILE=EGHTML;
proc print;


Thanks!
deleted_user
Not applicable
Thank you very much Cynthia,

You made my day :).

Closing everything with the _ALL_ worked just fine, but I'm curious as of why the ODS HTML CLOSE did not close the html file popping up...

Anyway, thank you again, your expertise was quite appreciated!

Samuel
Cynthia_sas
SAS Super FREQ
Hi:
Well, there is really more than one method for opening an ODS file. There's the simple:
ODS HTML FILE='myfile.html';

method of opening an HTML file. The above method of opening the file, needs to be closed with the simple: ODS HTML CLOSE;

However, there's a more advanced way of opening an ODS HTML file:
ODS HTML(ID=1) file='myfile1.html';
or
ODS HTML(FIRST) file='myfile_alt.html';

...what's in parentheses is called the ID= suboption. As you can see, it allows for great flexibility in naming the specific ODS destination that you're invoking to create your output file and the rule is that when you use this method you have to close the ODS file the same way you open it. So for the above methods of opening the file, the relevant closing methods would be:

ODS HTML(ID=1) CLOSE; and
ODS HTML(FIRST) CLOSE; OR
ODS _ALL_ CLOSE;

Enterprise Guide must open ODS HTML using the ID= suboption to keep it from accidentally being closed by someone who copied code that had an ODS HTML CLOSE in it. In your case, the _ALL_ was what you needed.

cynthia

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 9 replies
  • 1379 views
  • 0 likes
  • 4 in conversation