The initial symptom of this problem is that a style sheet specification will be ignored if both of the following circumstances are in place:
a) the _ODSSTYLESHEET option is used with the %STPBEGIN/%STPEND macros OR an ODS HTML with the STYLESHEET= option is included in a stored process;
AND
b) the stored process is being executed from a Web browser via the Stored Process Web Application (including the Portal).
Here is an example of setting the _ODSSTYLESHEET option in the stored process code:
%let _ODSSTYLESHEET=(url="http://myserver/mycss.css");
A "View Source" of the HTML page that is returned will show an invalid url reference for the style sheet. Given the above example, the invalid url would be similar to this:
<link rel="stylesheet" type="text/css" href="/SASStoredProcess/do?_sessionid=3F4D81FE-EF89-4625-86E5-5C79F6226E47&_program=replay&_entry=APSWORK.TCAT0008.http://myserver/mycss.css">
A more serious symptom of this problem occurs if the program that specifies _ODSSTYLESHEET is submitted multiple times. The Stored Process Server can experience a slowdown in performance and might eventually become unresponsive. This occurs because each attempt to replay an invalid catalog entry implicitly creates a session which consumes Stored Process Server resources.
See the following Problem Notes for further information:
http://support.sas.com/kb/20387
http://support.sas.com/kb/30920
To circumvent the problem, use the approach illustrated in this example for specifying a style sheet:
/* Purpose: specify a stylesheet at the top of the HTML*/
/* output. Then, suppress the in-stream stylesheet */
/* that is usually created by default */
/* This causes the stylesheet to be used for the entire */
/* HTML file. */
%macro use_stylesheet(stylesheet_name);
%global _ODSDEST;
ODS PATH (prepend) work.templat(update);
proc template;
define tagset tagsets.nostyle;
parent=tagsets.html4;
embedded_stylesheet=no;
end;
run;
ods html body=_webout
stylesheet=(URL="&stylesheet_name");
ods html close;
%let _ODSDEST=tagsets.nostyle;
%mend use_stylesheet;
%use_stylesheet(http://myserver/sample.css);
%stpbegin;
proc print data=sashelp.class;
run;
proc gchart data=sashelp.class;
vbar age;
run;
%stpend;
Operating System and Release Information
SAS System | SAS Integration Technologies | z/OS | 9.1 TS1M3 | 9.2 TS2M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 | 9.2 TS2M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 | 9.2 TS2M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 | 9.2 TS2M0 |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 | 9.2 TS2M0 |
Microsoft® Windows® for x64 | 9.1 TS1M3 | 9.2 TS2M0 |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 | 9.2 TS2M0 |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 | 9.2 TS2M0 |
Microsoft Windows 2000 Server | 9.1 TS1M3 | 9.2 TS2M0 |
Microsoft Windows 2000 Professional | 9.1 TS1M3 | 9.2 TS2M0 |
Microsoft Windows NT Workstation | 9.1 TS1M3 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 | 9.2 TS2M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 | 9.2 TS2M0 |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 | 9.2 TS2M0 |
Microsoft Windows XP Professional | 9.1 TS1M3 | 9.2 TS2M0 |
Windows Vista | 9.1 TS1M3 | 9.2 TS2M0 |
64-bit Enabled AIX | 9.1 TS1M3 | 9.2 TS2M0 |
64-bit Enabled HP-UX | 9.1 TS1M3 | 9.2 TS2M0 |
64-bit Enabled Solaris | 9.1 TS1M3 | 9.2 TS2M0 |
HP-UX IPF | 9.1 TS1M3 | 9.2 TS2M0 |
Linux | 9.1 TS1M3 | 9.2 TS2M0 |
OpenVMS Alpha | 9.1 TS1M3 | 9.2 TS2M0 |
Solaris for x64 | 9.1 TS1M3 | 9.2 TS2M0 |
Tru64 UNIX | 9.1 TS1M3 | 9.2 TS2M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.