The SAS Output Delivery System and reporting techniques

Safe to use EDIT for style template management in SAS 9.2?

Reply
Contributor
Posts: 23

Safe to use EDIT for style template management in SAS 9.2?

I would like to create a new template store that would contain 2 style templates:
(1) Printer92, which would be identical to Printer from sashelp.tmplmst,
(2) Printer, which would be identical to the original Printer except for the fonts.

The idea is that users could prepend the new template store in their ODS PATH statement, so they could get different fonts in their PDF output without having to specify style= on each ODS PDF statement, and without overwriting the SAS-supplied Printer style.

After looking into a number of ways to do this, the best (mentioned in a Tech Support note) seemed to be to use the EDIT statement in PROC TEMPLATE (full code below). This seems to work fine, and to be platform and version-independent. My only worry is that I don't see the EDIT statement in the 9.2 documentation for style templates. (I do see it for table templates.)

So, I'm wondering whether this use of EDIT has been deprecated with the 9.2 style syntax changes, and if there are some hidden dangers with it. (Or maybe I just missed it in the documentation?)

proc datasets library=work nolist nowarn;
delete pdf913 / memtype=itemstor;
quit;

proc template;
path work.pdf913 (UPDATE) sashelp.tmplmst (READ);
edit styles.printer as styles.printer92;
end;
edit styles.printer;
style fonts /
'TitleFont2' = ("Times",12pt,bold italic)
'TitleFont' = ("Times",13pt,bold italic)
'StrongFont' = ("Times",10pt,bold)
'EmphasisFont' = ("Times",10pt,italic)
'FixedEmphasisFont' = ("Courier",9pt,italic)
'FixedStrongFont' = ("Courier",9pt,bold)
'FixedHeadingFont' = ("Courier",9pt,bold)
'BatchFixedFont' = ("Courier",6.7pt)
'FixedFont' = ("Courier",9pt)
'headingEmphasisFont' = ("Times",11pt,bold italic)
'headingFont' = ("Times",11pt,bold)
'docFont' = ("Times",10pt);
end;
run;

ods path (prepend) work.PDF913 (READ);
SAS Super FREQ
Posts: 8,862

Re: Safe to use EDIT for style template management in SAS 9.2?

Posted in reply to MikeRhoads
Hi, Mike:
I have only seen the EDIT statement used with TABLE templates...so I can't speak to the issue of whether 1) it ever worked with STYLE templates or 2) if it worked, whether it will continue to work with 9.2....

This might be a better question for the ODS folks in Tech Support.

cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 124 views
  • 0 likes
  • 2 in conversation