Use an ODS PATH statement when creating custom templates.
libname process1 '/folders/myfolders/templates';
ods path template.process1(update) sashelp.tmplmst(read);
proc template;
define style MyStyle /store=process1.tmplts;
Replace Table from Output /
frame=BOX
Rules=groups
cellpadding=2pt
borderspacing=0.75pt
borderwidth=0.75pt
borderstyle=solid;
Replace Body from Document /
topmargin=1in
bottommargin=1in
leftmargin=1in
rightmargin=1in;
parent=styles.sasdocPrinter;
replace fonts /
'TitleFont2'=("Times New Roman", 10.1pt)
'TitleFont'=("Times New Roman", 10.1pt)
'StrongFont'=("Times New Roman", 10.1pt)
'EmphasisFont'=("Times New Roman", 10.1pt)
'FixedEmphasisFont'=("Courier New", 10.1pt)
'FixedStrongFont'=("Courier New", 10.1pt)
'FixedHeadingFont'=("Courier New", 10.1pt)
'BatchFixedFont'=("Courier New", 10.1pt)
'FixedFont'=("Courier New", 10.1pt)
'headingEmphasisFont'=("Times New Roman", 10.1pt)
'headingFont'=("Times New Roman", 10.1pt)
'docFont'=("Times New Roman", 10.1pt);
end;
run;
Then use an ODS PATH statement in your other programs to let SAS know that you have your own style templates.
options nodate;
libname process1 '/folders/myfolders/templates';
* MyStyle template has been saved to process1 library in a separate program ;
* use ods path statement to make custom templates available ;
ods path process1.tmplts(update) sashelp.tmplmst(read);
ods pdf
style=MyStyle
file='/folders/myfolders/templates/Example using custom template.pdf' ;
proc print data=sashelp.class;
run;
ods pdf close;
ods path reset;
The screen shot below shows the PROC PRINT using the custom style.
PROC PRINT using custom style
... View more