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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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