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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.