BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
UHO
Calcite | Level 5 UHO
Calcite | Level 5

Hi,

I have written a sas BASE program that does a lot of data transformations and then finally, a report. I’m using PROC TABULATE for many of the summaries and only using the out dataset option to create a dataset that I then do further transformations on. I’m not interested in the output first tabulate steps and I have closed the output using ods html close and ods listing close. When I come to the final output step I turn on ods HTML and there I have my report.

Now I want to implement the logic in EG, still just wanting the final report. Now I encounter problem. In EG it is not possible to turn off the output as in SAS BASE, the output end up default in the SAS report.

Does anyone know how to turn off the output to the SAS REPORT in EG in code (not in options) and then turn it on in a later step?

The simple example below tries to explain. I only want the SAS report from the last tabulate.

Best Regards

Ulf

/* From this tabulate I only want the outdataset. No SAS report */

proc tabulate data = data.analysdata missing out = tot1(where = (q6_1 NE .keep = q6_1 flag_PctSum_0);

                  var flag;

                  class q6_1;

                  table q6_1, (colpctsum * flag);

                  format flag best4.1;

run;

/* And from this tabulate I want to have the SAS report */

proc tabulate data = data.analysdata missing out = tot1;

                  var flag;

                  class q6_2;

                  table q6_2, (colpctsum * flag);

                  format flag best4.1;

run;

1 ACCEPTED SOLUTION

Accepted Solutions
MichelleHomes
Meteorite | Level 14

Try using:

ods _all_ close;

Kind Regards,

Michelle

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com

View solution in original post

3 REPLIES 3
MichelleHomes
Meteorite | Level 14

Try using:

ods _all_ close;

Kind Regards,

Michelle

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
UHO
Calcite | Level 5 UHO
Calcite | Level 5

Thanks,

First ods _all_ close then I applied ods tagsets as below.

Great!

Best regards

Ulf

ods _all_ close; /* Close all output to SAS report */

proc tabulate data = data.analysdata missing out = tot1(where = (q6_1 NE .)  keep = q6_1 flag_PctSum_0);

   var flag;

   class q6_1;

   table q6_1, (colpctsum * flag);

   format flag best4.1;

run;

/* Open output to SAS report */

ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR STYLE=HtmlBlue

STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/5.1/Styles/HtmlBlue.css") NOGTITLE NOGFOOTNOTE GPATH=&sasworklocation ENCODING=UTF8 options(rolap="on");

/* And from this tabulate I want to have the SAS report */

proc tabulate data = data.analysdata missing out = tot1;

   var flag;

   class q6_2;

   table q6_2, (colpctsum * flag);

   format flag best4.1;

run;

ChrisHemedinger
Community Manager

For more information about controlling ODS output from within SAS Enterprise Guide, read this paper:

Destination Known: Programmatically Controlling Your Output in SAS® Enterprise Guide®, by Aaron Hill

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2491 views
  • 0 likes
  • 3 in conversation