BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Reeza
Super User
Why would that even matter though if all the output was needed? Maybe I'm not understanding the requirements then.
If you turned off other destinations/results which are open by default and have only ODS EXCEL open all the results should go there by default.
Tom
Super User Tom
Super User

@Reeza wrote:
Why would that even matter though if all the output was needed? Maybe I'm not understanding the requirements then.
If you turned off other destinations/results which are open by default and have only ODS EXCEL open all the results should go there by default.

How does the subprogram that is just trying to use ODS EXCEL the dump some data know what other destinations it needs to close and how to open them again?

Can you show example that turns off all other destinations AND turns that back on again? Works with the goofy things that SAS/Studio sets up? etc.

Reeza
Super User
ODS _all_ close should close all other destinations. Turning them on again is usually the issue. But EG doesn't have all open, it typically only has whatever's specified and turning them off is usually fairly easy.

This seems to work previously:
https://communities.sas.com/t5/SAS-Enterprise-Guide/Supressing-results-in-EG/td-p/342038
Reeza
Super User

This works fine in SAS Studio. Studio resets the settings so you can just turn it off, it turns them on automatically after.

 

ods _all_ close;
ods excel file='/home/fkhurshed/Demo1/x21.xlsx';

proc report data=sashelp.class; run;
ods excel close;

No results in the Results window, running proc print after goes to results window without the need to reset anything. 

Just tested on SAS Academics on Demand, which is 9.4 M6

 

 

Tom
Super User Tom
Super User

@Reeza wrote:

This works fine in SAS Studio. Studio resets the settings so you can just turn it off, it turns them on automatically after.

 

ods _all_ close;
ods excel file='/home/fkhurshed/Demo1/x21.xlsx';

proc report data=sashelp.class; run;
ods excel close;

No results in the Results window, running proc print after goes to results window without the need to reset anything. 

Just tested on SAS Academics on Demand, which is 9.4 M6

 

 


SAS/Studio does not have any function I can call to turn them on again.  It might in the next block of code that is submitted but nothing I have seen that I can trigger after I am done dumping my data to excel and want to continue with the rest of my program.

Reeza
Super User
In Studio that's correct, because opening back ODS HTML requires a filepath which is annoying, though you could just set it to the work directory, but I don't believe that's the case in EG - you could specify ODS HTML or ODS LISTING or ODS RESULTS=ON after the fact to get your results.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 20 replies
  • 7564 views
  • 2 likes
  • 3 in conversation