SAS Programming

DATA Step, Macro, Functions and more
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

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 4021 views
  • 0 likes
  • 2 in conversation