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

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.

1 ACCEPTED SOLUTION

Accepted Solutions
BaVe
Fluorite | Level 6

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

8 REPLIES 8
collinelliot
Barite | Level 11

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

BaVe
Fluorite | Level 6

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;

 

BrunoMueller
SAS Super FREQ

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

 

BaVe
Fluorite | Level 6

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.

 

 

BrunoMueller
SAS Super FREQ

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

BaVe
Fluorite | Level 6

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.

BrunoMueller
SAS Super FREQ

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

BaVe
Fluorite | Level 6

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.

 

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
  • 8 replies
  • 1084 views
  • 0 likes
  • 3 in conversation