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

Hello!

 

I've written a macro program and was wondering if there was a way to remove the title "The MEANS Procedure" from the output of the summary statistic portion (PROC MEANS) without using an ODS statement outside of the macro programming.  Thank you in advance for your time! 

 

 

ODS NOPROCTITLE;
%MACRO	HS	 (DSNm = , Vbl = , Stats = N MEAN STDDEV,
						 NDec = 1);
						 
TITLE1 "Summary Statistics for '&Vbl.' from Data Set '&DSNm'" ITALIC;
PROC MEANS 
		DATA = &DSNm
		MAXDEC = &NDec
		&Stats;
	VAR	&Vbl;
	RUN;
TITLE;

%MEND	HS;
ODS;


%HS (DSNm = work.test, Vbl = WtLb, Stats = Q1 MEDIAN Q3, NDec = 0)

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
andreas_lds
Jade | Level 19

If you don't want to see the proc-title, you have to use "ods noproctitle". But you could, of course move the ods-statement into the macro. Unfortunately, it seems that no function exists to check how an ods option is set. For normal options you could use the function getoption in a data-step to backup the original value, change it to fit your needs and revert back to the original setting at the end of you macro. To bad, that such a function doesn't exist for the ods-options, at least i haven't found one.

View solution in original post

2 REPLIES 2
andreas_lds
Jade | Level 19

If you don't want to see the proc-title, you have to use "ods noproctitle". But you could, of course move the ods-statement into the macro. Unfortunately, it seems that no function exists to check how an ods option is set. For normal options you could use the function getoption in a data-step to backup the original value, change it to fit your needs and revert back to the original setting at the end of you macro. To bad, that such a function doesn't exist for the ods-options, at least i haven't found one.

missamyyu
Calcite | Level 5

Thank you so much!  I appreciate your time.  Yes, I wish such a function exists!

Amy

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 2656 views
  • 0 likes
  • 2 in conversation