Hi One more try. %macro pdf(name); options orientation=landscape; ods noresults; ods pdf file="c:\School 2019.pdf"; ods escapechar='^'; ods pdf text="^S={just=c fontweight=bold font_size=10} School 2019."; ods pdf text="^S={fontweight=bold font_size=5} Name: &name."; ods pdf text="^n"; PROC REPORT DATA=work.fravaer LS=158 PS=97 SPLIT="/" CENTER missing nowd; COLUMNS name; DEFINE name / display 'Elevens navn' style(column header)=[font_weight=bold]; RUN; ods pdf close; %mend pdf; /*Here is a program to make the macro to make the pdf-call %pdf(O'Leary);*/ filename bo2 catalog "work.SASCatalog.bo2.source" lrecl=32767 recfm=v; data _null_; file bo2; length cpr codeline $4000. pct_fravaer 8.; set fravaer_nuv_skoleaar_barn; by cpr sort_md pct_fravaer; if last.cpr; codeline = "%" !! "pdf("!!name!!");"; put codeline;run; %inc bo2; How do I make the apostrophe be a part of the text in name, and not a part of the SAS code ?
... View more