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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 319 views
  • 0 likes
  • 2 in conversation