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,

 

Below is a macro program that I wrote for class.  I am trying to get the TITLE1 for my summary statistic section (PROC MEANS) to output in italics.  I can't seem to get it to be italicized when I run it in SAS and when I create a pdf as well.   I would love help with how to fix this.  Thank you for your time!

 

 

ODS PDF FILE = "&CourseRoot/filepath/Test.pdf";
ODS NOPROCTITLE;
%MACRO	HS	(DSNm = , Vbl = , Stats = N MEAN STDDEV,
						 NDec = 1);
						 
TITLE1 "Histogram for '&Vbl.' from Data Set '&DSNm'";
PROC SGPLOT DATA = &DSNm;
	HISTOGRAM	&Vbl;
	RUN;
TITLE;

TITLE1 "Summary Statistics for '&Vbl.' from Data Set '&DSNm'" ITALIC;
PROC MEANS 
		DATA = &DSNm
		MAXDEC = &NDec
		&Stats;
	VAR	&Vbl;
	RUN;
TITLE;

%MEND	HS;

%HS (DSNm = Work.Test, Vbl = WtLb, Stats = Q1 MEDIAN Q3 P90, NDec = 0);

ODS;
ODS PDF CLOSE;

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
camdbean
Fluorite | Level 6
Hello!

It seems that your ITALIC option is out of place. If you place it before yout text string in the title, so that line looks like

TITLE1 ITALIC "Summary Statistics for '&Vbl.' from Data Set '&DSNm.'";

That should work. When you type in ITALlIC, you should see it as a suggested option by SAS, and it should highlight blue.
Hope this works!

View solution in original post

2 REPLIES 2
camdbean
Fluorite | Level 6
Hello!

It seems that your ITALIC option is out of place. If you place it before yout text string in the title, so that line looks like

TITLE1 ITALIC "Summary Statistics for '&Vbl.' from Data Set '&DSNm.'";

That should work. When you type in ITALlIC, you should see it as a suggested option by SAS, and it should highlight blue.
Hope this works!
missamyyu
Calcite | Level 5

@camdbean  - that worked great.  Thank you so much!!

Best,

Amy

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