Sample 36900: Instructions for viewing all of the style templates that are shipped with SAS®
To view the names of all of the style templates that are shipped with SAS®, the TEMPLATE procedure can be used with the LIST statement to display the names of all of the templates that are located in the SASHELP.TMPLMST item store. The style templates are all located in the Styles folder by default.
proc template;
list styles;
run;
To visually view all of the styles shipped with SAS, you can use PROC TEMPLATE with the LIST statement and macro logic to dynamically build an HTML frame. See the code on the Full Code tab for an example.
An alternate method showing the styles applied to PDF and RTF output is shown on page 13 of the following paper: The Output Delivery System (ODS) from Scratch.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This macro creates an HTML frame that displays all of the styles shipped with SAS. The only requirement to run this macro is to set the PATH= macro variable. This path specifies the location of the HTML files created by the macro. To see all of the styles displayed, open the FRAME.HTML file in the location specified with the PATH= macro variable.
%let path=c:\temp;
%macro showstyle(style);
ods html path="&path"(url=none) file="&style..html"
contents=temp(notop nobot) frame="frame.html" style=&style;
ods proclabel "Style name";
proc print data=sashelp.class contents="Styles.&style";
run;
ods html close;
%mend;
ods path work.templat(update) sashelp.tmplmst(read);
filename temp "&path\contents.html" mod;
ods html path="&path"(url=none) contents=temp(nobot);
ods html exclude stats;
ods output stats=styles(where=(type ne "Dir"));
proc template;
list styles;
run;
proc sort data=styles;
by path;
run;
data one;
set styles;
by path;
if first.path then
call execute('%showstyle('||path||')');
run;
data _null_;
file temp;
put "</body>";
put "</html>";
run;
ods path reset;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
Below is an image of how the frame will look.
>
Date Modified: | 2021-05-24 16:16:45 |
Date Created: | 2009-08-17 14:28:50 |
Operating System and Release Information
SAS System | Base SAS | z/OS | 8.2 TS2M0 | |
OpenVMS VAX | 8.2 TS2M0 | |
OS/2 | 8.2 TS2M0 | |
Microsoft Windows 95/98 | 8.2 TS2M0 | |
Microsoft Windows 2000 Advanced Server | 8.2 TS2M0 | |
Microsoft Windows 2000 Datacenter Server | 8.2 TS2M0 | |
Microsoft Windows 2000 Server | 8.2 TS2M0 | |
Microsoft Windows 2000 Professional | 8.2 TS2M0 | |
Microsoft Windows NT Workstation | 8.2 TS2M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 8.2 TS2M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 8.2 TS2M0 | |
Microsoft Windows Server 2003 Standard Edition | 8.2 TS2M0 | |
Microsoft Windows XP Professional | 8.2 TS2M0 | |
Windows Millennium Edition (Me) | 8.2 TS2M0 | |
64-bit Enabled AIX | 8.2 TS2M0 | |
64-bit Enabled HP-UX | 8.2 TS2M0 | |
64-bit Enabled Solaris | 8.2 TS2M0 | |
ABI+ for Intel Architecture | 8.2 TS2M0 | |
AIX | 8.2 TS2M0 | |
HP-UX | 8.2 TS2M0 | |
IRIX | 8.2 TS2M0 | |
Linux | 8.2 TS2M0 | |
OpenVMS Alpha | 8.2 TS2M0 | |
Solaris | 8.2 TS2M0 | |
Tru64 UNIX | 8.2 TS2M0 | |