The following steps
use ODS to develop a Web presentation for the Metaview applet. This
particular example displays a single graph. The metacodes for that
graph are embedded in the body of the HTML output file.
-
Specify the JAVAMETA
device driver.
goptions reset=all device=javameta;
-
Close the LISTING destination
to conserve resources.
ods listing close;
-
Open the HTML destination.
You can also specify an HTML filename with the BODY= option. If you
do not specify an HTML output filename, the default filename is
sashtml.htm
. The APPLETLOC= system option specifies
the default location of the applet JAR files. If necessary, you can
specify another location with the CODEBASE= option in the SAS program.
ods html body="filename.htm"
<codebase="location-of-jar-files">;
-
Include the
SAS/GRAPH
procedure code.
proc gchart data=sashelp.class;
vbar height / group=age;
run;
quit;
-
Close the HTML destination.
You must close the HTML destination to generate output. (You may also
want to reopen the LISTING destination.)
ods html close;
ods listing;
Submit the program to
generate the HTML output file, which includes the metacodes generated
by the JAVAMETA device.
When you view the HTML
file in a Web browser, the Metaview applet renders the graph defined
by the metacodes.