Desktop productivity for business analysts and programmers

Stored Process no Sas Report

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 7
Accepted Solution

Stored Process no Sas Report

Dear All,

 

I have made a Stored Process, but it keeps giving me a SAS report which I do not need.

I've tried proc no print, but that didn't work and as far as I can see there are no options to turn on/off.

 

How do I make the Stored Procedure to not give me a SAS Report when it's done?

 

Best Regards.


Accepted Solutions
Solution
‎04-19-2017 06:39 AM
Occasional Contributor
Posts: 7

Re: Stored Process no Sas Report

It still generated a Report doing as you suggested, which made me sensing it's a mandatory automated process within the Stored Process as indicated by Tools -> Options -> Stored Process, where I can't click a 'none' option.

 

I've also tried ODS HTML CLOSE; and ODS _ALL_CLOSE; but this also didn't work.

 

However, it could also be done by defining a variable _ODSDEST like this:

%global Varname

             _ODSDEST;

%let _ODSDEST = NONE;

 

This works, as a report was suppressed but it did give me another error message asking whether or not there was a %STPBGN and %STPEND and if it performed without error. It did create the 2 tables without a report, so that's the way it worked for me.

 

Thanks for all your help.

 

View solution in original post


All Replies
PROC Star
Posts: 295

Re: Stored Process no Sas Report

Have you tried "ods noresults;" before the start of any procedures that will generate output?

Occasional Contributor
Posts: 7

Re: Stored Process no Sas Report

No I did not, but everywhere I place it, I get the message.

 

ERROR 180-322: Statement is not valid or it is used out of proper order.

 

Where do I put the statement?

 

My code is like:

%global some vars;

 

%STPBEGIN;

LIBNAME some lib;

 

PROC SQL NOPRINT;

code for table 1;

QUIT;

PROC SQL NOPRINT

code for table2;

QUIT;

quit;

%STPEND;

 

SAS Super FREQ
Posts: 706

Re: Stored Process no Sas Report

Hi

 

Some questions:

  • What does the Stored Process do, just create tables?
  • How is it called?
  • Do you want to inform the caller about how the program run?

 

As long as your code does not create any output, there will be none.

Otherwise add

ods select none;

statement

 

Bruno

 

Occasional Contributor
Posts: 7

Re: Stored Process no Sas Report

Hi,

 

I've made the stored process in order to have a cascading prompt.

Based on a year and month, it has dependencies on a list of files is accesses. (mainly to take care of 'noise')

It uses the selection to create 2 tables according to the choices.

 

the stored process is called Run Selection.

 

So, I get 2 tables, but also 1 sasreport which is redundant and I want the stored proces to not make a report.

 

I've looked in the log and there SAS seems to make a report automatically while running the stored process.

Based on that I've looked in the options and turned off the option SASreport in General Results, but that doesn't work either.

 

Hope this clears up the questions you had.

 

 

SAS Super FREQ
Posts: 706

Re: Stored Process no Sas Report

Hi

 

the question "How is it called?" referred to, how do you run the Stored Process: from SAS Enterprise Guide, from SAS Add-In for Microsoft Office, from the SAS Stored Process web application, etc.

 

Have you tried the ODS SELECT NONE; statement?

 

Bruno

Occasional Contributor
Posts: 7

Re: Stored Process no Sas Report

it's called from EG.

 

I'm trying it out as we speak. Could you indicate where in my example code in an earlier reply I should place it?

 

Thanks.

SAS Super FREQ
Posts: 706

Re: Stored Process no Sas Report

Right after the %STPBEGIN;

 

But you should check your code for any Proc that creates output.

 

Since you call the Stored Process from EG you have easy access to the SAS log.

 

This will always help

 

Bruno

Solution
‎04-19-2017 06:39 AM
Occasional Contributor
Posts: 7

Re: Stored Process no Sas Report

It still generated a Report doing as you suggested, which made me sensing it's a mandatory automated process within the Stored Process as indicated by Tools -> Options -> Stored Process, where I can't click a 'none' option.

 

I've also tried ODS HTML CLOSE; and ODS _ALL_CLOSE; but this also didn't work.

 

However, it could also be done by defining a variable _ODSDEST like this:

%global Varname

             _ODSDEST;

%let _ODSDEST = NONE;

 

This works, as a report was suppressed but it did give me another error message asking whether or not there was a %STPBGN and %STPEND and if it performed without error. It did create the 2 tables without a report, so that's the way it worked for me.

 

Thanks for all your help.

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 8 replies
  • 172 views
  • 0 likes
  • 3 in conversation