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

Is there a way to disable this warning?

I have a macro program in which I have PURPOSELY turned-off all destinations and am using old-fashion OUTPUT statements on various PROCs (e.g., UNIVARIATE and SUMMARY) to get the output into datasets that I later summarize via various ODS destinations (in the program in question I'm outputting to the RTF and TAGSETS.EXCELXP destinations) --- and I don't want any output from the PROCs in question otherwise (I've also got 'ods results off' set) ---

--- BUT I don't want the WARNING in the log (I'm actually redirecting the log via PROC PRINTTO), as I want my end users to review the log for "real" errors and warnings --- so I just want to turn of that particular warning, so they aren't distracted by so many of the same (in this case) meaningless warnings.

Is that possible?

TIA

1 ACCEPTED SOLUTION

Accepted Solutions
DavidK_SAS
SAS Employee

Allen,

  Try:

ods select none;


-- David Kelley, SAS

View solution in original post

8 REPLIES 8
Tom
Super User Tom
Super User

Many procs have NOPRINT options.

You could also try re-directing listing to a null device.

* Unix ;

ods listing file='/dev/null' ;

* PC ;

ods listing file='nul:';

AllenEBingham
Calcite | Level 5

David,

Worked great, when I used your suggestion INSTEAD of closing all ODS destinations (I assume you intended that).

Thanks-Allen

AllenEBingham
Calcite | Level 5

Tom,

I already was using the NOPRINT in the procedures that needed that (e.g, UNIVARIATE), and the other I was using (SUMMARY) doesn't produce 'printed' results. I didn't try your suggestion of routing the LISTING to "null", since in SAS 9.3 the default ouput destination is not LISTING ... and I found David Kelley's later answer to work. Thanks for the suggestion anyway.

Take care-Allen

IJU
Fluorite | Level 6 IJU
Fluorite | Level 6

Hi Tom,

I was looking for a solution to suppress listing, but output HTML. ‘ODS select none’ disables all destinations including HTML.  Your solution with re-directing listing to a null device removes listings only.  I knew how to redirect in DOS batch script: ‘ > nul’, but did not realize that the same syntax can be used in SAS code.  A simple Google search brought me to this discussion.

Thank you very much.

DavidK_SAS
SAS Employee

Allen,

  Try:

ods select none;


-- David Kelley, SAS

kjohnsonm
Lapis Lazuli | Level 10

Can anyone tell me the differance with this code lines below?
My suppervisor instructed me to use the later, but I keep getting the warning discribed in this thread.  -KJ

:

 

 

ods select none;

ods listing close;

 

 

 

Mohkad
Calcite | Level 5

Hi David,

 

Can you please see my problem, I have posted it in my profile..

 

Thanks

WarrenKuhfeld
Rhodochrosite | Level 12

Closing all destinations has never been the proper way to disable displayed output.  As David said, use ODS SELECT NONE/ALL or ODS EXCLUDE ALL/NONE.  The warning is helpful and should remain.

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!

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
  • 8 replies
  • 14429 views
  • 2 likes
  • 7 in conversation