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

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