Using ODS with the JAVAMETA Device

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.
  1. Specify the JAVAMETA device driver.
    goptions reset=all device=javameta;
  2. Close the LISTING destination to conserve resources.
    ods listing close;
  3. 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">;
    You can enhance your Web presentation by specifying other applet parameters, as described in Metaview Applet Parameters..
  4. Include the SAS/GRAPH procedure code.
    proc gchart data=sashelp.class;
       vbar height / group=age;
    run; 
    quit;
  5. 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.