Sample 36900: How to view all styles shipped with SAS
To view all of the templates 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.
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;
Below is an image of how the frame will look.
>
This sample illustrates how to view all styles shipped with SAS.
| Date Modified: | 2009-09-04 15:29:03 |
| 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 | |