Specifying Parameters and Attributes for Java and ActiveX

About Specifying Parameters in ODS Statements

You can specify attributes and parameters in ODS to override default values in Java and ActiveX. No attributes or parameters are required. SAS provides workable defaults in most cases.
Attributes can be any HTML name/value pair that is valid inside the initial (opening) OBJECT tag. Parameters are values that appear in the body of the OBJECT tag, to configure the appearance or functionality of a Java applet or the ActiveX control.
Attributes and parameters are specified as options of one of the available ODS statements, such as ODS HTML:
ODS HTML
<ATTRIBUTES=("attr-name"="attr-value")>
<PARAMETERS=("param-name"="param-value")>
<other-options>;
The preceding syntax applies to all applicable ODS statements, such as HTML, MARKUP, PDF, PS, and RTF.
You can specify more than one name/value pair (separated by blank spaces) inside the parenthesis of an ATTRIBUTES= or PARAMETERS= option. You can also specify multiple ATTRIBUTES= and PARAMETERS= options in a single ODS statement. These options can be specified in any order in the ODS statement.
You can remove a parameter tag by specifying a $ for its value, or by setting it to None using the menu of the applet or control. This removes the data and axis label that would otherwise be included in the graph.
You can also append ,n to tags that reference variables whose values are URLs. Normally, the substitution string is URL-encoded for browsers that do not support embedded white space in URL strings. Use ,n to prevent this encoding.
No intervening white space should be added between the primary tag and the appended ,f or ,n characters.
Note: Using ,n is not the same as using the applet parameter PATTERNSTRIP. The PATTERNSTRIP parameter removes blank spaces from data values before those values are applied to substitution strings.
Most of the examples in the following topics specify parameters:
For information about other ODS statement options, see the SAS Output Delivery System: User's Guide.
In HTML output that runs an applet or a control, all values of the ATTRIBUTES= option appear in the opening OBJECT tag. For example, a SAS/GRAPH program can specify the WIDTH attribute as follows:
ods html file="C:\sashtml\piechart.htm"
                     attributes=("width"="720");
In the HTML output file, the WIDTH attribute appears inside the beginning OBJECT tag as shown in the following:
<script language="javascript" type="text/javascript">
<!-- 
   document.writeln("<OBJECT");
   document.writeln('style=" width: 720px; height: 480px;
        background-color: #4E5056; border-width: 0px;"');
   document.writeln("ALIGN=\"baseline\" class=\"Graph\"");
   .
   .
   .
//-->
</script>
Valid attribute names are those that are enabled for the OBJECT tag in HTML. Valid attributes must also be specified as required by JAVA or ACTIVEX device drivers that run in the operating environment.
All of the name/value pairs that are specified in the ODS statement option PARAMETERS= appear in the body of the OBJECT tag. For example, a SAS program can disable the data tips and set the background color for a graph as follows:
ods html file="test.html" parameters=("tips"="none"
"backdropcolor"="CXff0000");
Valid parameter values for the ActiveX control, Graph applet, Map applet, and Contour applet are defined in Parameter Reference for Java and ActiveX. Parameters for other applets, such as the Metaview applet, are provided in the sections that apply to those applets, as in Metaview Applet Parameters.

Specifying the Location of Control and Applet Files (CODEBASE= and ARCHIVE= Options)

About the Control and Applet Files

When you generate Web presentations with the JAVA and ACTIVEX device drivers, the SAS/GRAPH software generates HTML pages that automatically look for the Java archive files or the ActiveX control file in the default installation location. If you install the ActiveX control .exe file or the Java archive .jar files in a location other than the default or if you want to publish Output Delivery System (ODS) output containing the SAS/GRAPH control or the applets in a Web server, then you might need to specify the location of the .exe file or the .jar files when you generate your Web presentation.
You can use the CODEBASE= option to specify the location of the ActiveX control or the Java applets. You can use the ARCHIVE= option to specify the name of the Java archive file.
Note: The ActiveX control must be installed locally on each PC where the Web presentation will be viewed.

Specifying the Location of the ActiveX Control

If you use the ACTIVEX device driver to generate output containing an ActiveX control, then specify the location and version of the .exe file with the CODEBASE= option in the ODS statement. Specify the directory and filename of the .exe file. (The default filename is sasgraph.exe.) The CODEBASE location can be specified as a pathname or as a URL. (See Specifying the CODEBASE= URL for more information.) If you have installed previous versions of the ActiveX control, then you also need to specify the version that you want to use. For example, if your .exe file is in /sasweb/graph) you would specify
ods html file="/path/to/mygraph.html" 
      codebase="/sasweb/graph/sasgraph.exe#version=9,3";

Specifying the Location of the Java Applets

By default, the location of the SAS Java archive files is specified by the APPLETLOC= system option. This value is the default value of the CODEBASE= parameter. If the default location is accessible by users who will be viewing your Web presentation, and the SAS Java archive is installed at that location, then you do not need to change the value of the CODEBASE= parameter.
If you use the JAVA device driver to generate output containing a SAS/GRAPH applet, then specify the path to the .jar file with the CODEBASE= option in the ODS statement. Specify only the directory of the .jar file. The CODEBASE location can be specified as a pathname or as a URL. (See Specifying the CODEBASE= URL for more information.) For example, if your .jar file is in /sasweb/graph), you would specify
ods html body="/path/to/mygraph.html" 
              codebase="/sasweb/graph";
The ARCHIVE= option specifies the filename of the .jar file(s). You do not need to specify the ARCHIVE= option in the ODS statement unless you have renamed the .jar files.
For applets generated with macros, specify the CODEBASE= argument for the macro. For example:
%ds2const(codebase=http://your_path_to_archive,
     htmlfile=your_path_and_filename.htm
     ...
);
For the DS2TREE and DS2CONST macros, you do not need to specify the ARCHIVE= argument unless you have renamed the .jar files.

Specifying the CODEBASE= URL

If the value that you specify for CODEBASE= is a URL, it can be a full URL (for example, http://your_server/sasweb/graph), or it can be relative to your Web server (/sasweb/graph). If you are publishing HTML only on Web servers where the control or the applets are installed in a common location, it is generally recommended that you use the shorter, relative URL. A relative URL enables you to move the HTML to any Web server without modifying the HTML (assuming the control or the applets are installed on that server). If you are creating HTML that will be viewed from an e-mail or copied to a Web server on which the applets are not installed, then you should use a full URL to point to the applet .jar files at a known location.

Specifying the Location of the Java Plug-In (CODEBASE= Attribute)

The CODEBASE= attribute in the ODS statement specifies the location of the Java plug-in from Sun Microsystems. By default, SAS points to the Web site of the Java plug-in from Sun Microsystems. If necessary, you can change the location of the Java plug-in by specifying the CODEBASE= attribute in the ODS statement. For example:
ods html file="c:\myfile.htm"
   attributes=("codebase"=
      "http://ourco.com/Plugins/j2re–1_4_1–windows-i586.exe");
On Windows systems, the user is prompted to install the plug-in if it is not already installed. On other systems, the plug-in can be installed from the Sun Microsystems site (http://www.sun.com) or from the SAS Third-Party Software References Web page:
http://support.sas.com/resources/thirdpartysupport/index.html.

Specifying the Java Virtual Machine Maximum Heap Size

To change the Java Virtual Machine (JVM) maximum heap size from the default size, include the PARAMETERS= option in your ODS HTML statement and set applet parameter JAVA_PARAMETERS to Xmxnnnm, where nnn is the new heap size in megabytes. For example, to set the heap size to 256 megabytes, use the following ODS HTML statement:
ods html parameters="JAVA_PARAMETERS"="Xmx256m";
For information about the ODS HTML PARAMETERS= option, see PARAMETERS= (parameter-pair-1 ... parameter-pair-n) in SAS Output Delivery System: User's Guide. For information about the Java parameters, visit the Sun Microsystems Web site at http://www.sun.com.