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

If I'm using a macro to create an identical report for 50 different programs, how can I stop all 50 .rtf files from opening when ods rtf close; occurs?

This is the ODS / PROC report code inside the macro:

OPTIONS NODATE NONUMBER;

ODS RTF FILE="C:\PROGRAM_PEER_CIP_ &CIP_NUMBER _RESULTS.RTF";

TITLE "Potential Peer Institutions for &CIP_NUMBER - &CIP_NAME";

title2 "&TOTAL_SELECTED out of &SAMPLE Selected using CAB AND Hanover Scoring Algorithm on CIP data";

PROC REPORT DATA=RESULTS PS=60 LS=110 MISSING SPLIT='\' NOWINDOWS;


run;

ODS RTF CLOSE;


We need run this for 50 CIPs and need each in it's own report. But we don't want/need everything to open automatically after the process is completed.

1 ACCEPTED SOLUTION
4 REPLIES 4
GregG
Quartz | Level 8

Thank you, Reeza!

This appears to have worked (from the other thread): I changed the preferences in Tools>Options>Preferences>results and unchecked the "View results as they are generated" - it worked perfectly.

Andre
Obsidian | Level 7

Greg,

ods noresults;

ODS RTF FILE="C:\PROGRAM_PEER_CIP_ &CIP_NUMBER _RESULTS.RTF";

TITLE "Potential Peer Institutions for &CIP_NUMBER - &CIP_NAME";

title2 "&TOTAL_SELECTED out of &SAMPLE Selected using CAB AND Hanover Scoring Algorithm on CIP data";

PROC REPORT DATA=RESULTS PS=60 LS=110 MISSING SPLIT='\' NOWINDOWS;


run;

ODS RTF CLOSE;

ods results;

the reports are silently written.

i hope this way solves your needs too.

At the end, you open the report outside SAS.

Andre

GregG
Quartz | Level 8

Thank you, Andre.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 4 replies
  • 7217 views
  • 4 likes
  • 3 in conversation