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

Ggood morning,

 

I'm a new sas user.

I have a problem to generate a report. In my script I use a proc freq, but before I must perform a macro that someone gave me. The problem is that this macro generate a report that I don't want in my final results.

 

Example:

 

ods pdf file = "path/file.pdf";

%macro_give_me;

proc freq data =data_set_created_from_macro;

run;

ods pdf close;

 

I tried solve adding ods results options in this way:

ods pdf file = "path/file.pdf";
ods noresults;
%macro_give_me;
ods results on;
proc freq data =data_set_created_from_macro;

run;

ods pdf close;

The program continues to print the result of Macro as well.

I could always go into the macro to enter noprint, but I'd like to avoid that.

 

Thanks!

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
andreas_lds
Jade | Level 19

Move the ods pdf file=".." -statement right after the macro is called.

View solution in original post

1 REPLY 1
andreas_lds
Jade | Level 19

Move the ods pdf file=".." -statement right after the macro is called.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 717 views
  • 0 likes
  • 2 in conversation