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-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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