Creating Interactive Output for Java |
To develop a SAS/GRAPH program that generates output for the Graph applet or Map applet, follow these steps:
Reset graphics options and specify the JAVA device:
goptions reset=all device=java;
To conserve resources, close the ODS LISTING destination:
ods listing close;
Open the ODS HTML destination. You can use the BODY= option to specify an HTML filename, and the STYLE= option to specify an ODS style (see Controlling The Appearance of Your Graphs). Use the PARAMETERS= option to configure the applet (see Specifying Parameters and Attributes for Java and ActiveX). For example:
ods html file="your_file.htm" style=gears parameters=("tips"="none");
Note: To run an applet, your users must be able access the appropriate Java archive files. Two archives are referenced by default: one is the Java plug-in from Sun Microsystems, and the other is the SAS Java archive.
In the HTML output file, the location of the Java plug-in from Sun Microsystems is specified in the CODEBASE attribute of the OBJECT tag. If you need to change this default value, then use the ATTRIBUTES= option of the ODS statement, as described in Specifying Parameters and Attributes for Java and ActiveX. 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
The location of the SAS Java archive is specified in the JAVA_CODEBASE and the ARCHIVE parameters in the body of the APPLET tag. The default JAVA_CODEBASE is specified by the APPLETLOC= system option. If the default value of this system option specifies a widely accessible URL, then you do not need to change this value. If you need to specify a different location, then you can change the value of the system option. Another alternative is to override the APPLETLOC= system option by specifying a value for the ODS statement option CODEBASE=, as described in Specifying Parameters and Attributes for Java and ActiveX.
Note: When specifying a location for the SAS Java archive, you can use an HTTP address, or you can use a UNC path, such as //sasjava, with forward slashes instead of backward slashes.
Run a procedure or procedures that are used by the JAVA device (see Procedures and Statements that Generate Output for the SAS/GRAPH ActiveX Control):
proc gchart data=sashelp.class; vbar height / group=age; run; quit;
Close the ODS HTML destination, and then reopen the ODS LISTING destination:
ods html close; ods listing;
Running your program starts the applet and displays the initial graph. If the browser display differs from what you see in SAS, then ensure that your SAS/GRAPH procedure is fully enabled in the applet. Refer to Summary of ActiveX and Java Support for details.
Note: Using the GMAP procedure to generate a highly detailed map might create a large HTML output file, which might cause problems on certain browsers. If this is the case, you can run the GREDUCE procedure to remove some of the complexity and produce a more usable map.
For further information on troubleshooting Web output, see Resolving Differences Between Graphs Generated with Different Technologies.
About the Java HTML Output and the Java Runtime Environment Plug-In |
The Java Runtime Environment (JRE) plug-in is required to open HTML output that is generated by the JAVA device. If you open an HTML file that you generated using the JAVA device and you do not have the JRE plug-in installed for your Web browser, the browser prompts you to install the JRE plug-in. You must install the JRE plug-in for your browser in this case. When your users open your HTML file, they will also have to install the JRE plug-in for their Web browser if the plug-in is not already installed on their computer.
The 9.2 SAS/GRAPH Java applets will work with JRE 1.5.0_12. They have also been tested with 1.5.0_13 and 1.5.0_15. We recommended that you use one of these versions. If future JREs are backward compatible, then the applets should work without any issues.
About Languages in JAVA |
For international audiences, the Java applets have graphical user interfaces that can appear in the following languages: Chinese (simplified), Czech, Danish, English, French, German, Hebrew, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, Russian, Spanish, and Swedish. Generally, to display a translated graphical user interface, Web-based JAVA devices must use a language-specific operating environment and Web browser. This requires the all-languages version of the JRE. For further information, contact your on-site SAS support personnel.
About Special Fonts and Symbols in JAVA |
The JAVA device supports only system fonts. In the LABEL and GPLOT SYMBOL statement, the ACTIVEX device supports the following SAS markers:
Marker | Plus | Spade | Club |
Square | Flag | Heart | Hexagon |
Star | X | Diamond | Cylinder |
Circle | Prism |
See SYMBOL Statement for more information.
SAS Formats Supported for Java |
The JAVA devices support the SAS character, numeric, and the date and time formats that are listed in the following tables. For a description of these formats, see SAS Language Reference: Dictionary.
$ | $ASCII | $BINARY | $CHAR |
$F | $HEX | $OCTAL |
|
BEST | BINARY | COMMA | COMMAX | COMMAX |
D | DOLLAR | DOLLARX | E | EURO |
EUROX | F | HEX | LOGPROB | NEGPAREN |
NLBEST | NLD | NLMNIAED | NLMNIAUD | NLMNIBGN |
NLMNIBRL | NLMNICAD | NLMNICHF | NLMNICNY | NLMNICZK |
NLMNIDKK | NLMNIEEK | NLMNIEGP | NLMNIEUR | NLMNIGBP |
NLMNIHKD | NLMNIHRK | NLMNIHUF | NLMNIIDR | NLMNIILS |
NLMNIINR | NLMNIJPY | NLMNIKRW | NLMNILTL | NLMNILVL |
NLMNIMOP | NLMNIMXN | NLMNIMYR | NLMNINOK | NLMNINZD |
NLMNIPLN | NLMNIROL | NLMNIRUB | NLMNIRUR | NLMNISEK |
NLMNISGD | NLMNISKK | NLMNITHB | NLMNITRY | NLMNITWD |
NLMNIUSD | NLMNIZAR | NLMNLAED | NLMNLAUD | NLMNLBGN |
NLMNLBRL | NLMNLCAD | NLMNLCHF | NLMNLCNY | NLMNLCZK |
NLMNLDKK | NLMNLEEK | NLMNLEGP | NLMNLEUR | NLMNLGBP |
NLMNLHKD | NLMNLHRK | NLMNLHUF | NLMNLIDR | NLMNLILS |
NLMNLINR | NLMNLJPY | NLMNLKRW | NLMNLLTL | NLMNLLVL |
NLMNLMOP | NLMNLMXN | NLMNLMYR | NLMNLNOK | NLMNLNZD |
NLMNLPLN | NLMNLROL | NLMNLRUB | NLMNLRUR | NLMNLSEK |
NLMNLSGD | NLMNLSKK | NLMNLTHB | NLMNLTRY | NLMNLTWD |
NLMNLUSD | NLMNLZAR | NLMNY | NLMNYI | NLNUM |
NLNUMI | NLPCT | NLPCTI | NLPVALUE | NUMX |
OCTAL | PERCENT | PERCENTN | PVALUE | ROMAN |
RSTDOCNY | RSTDOCYY | RSTDONYN | RSTDOPNY | RSTDOPYN |
RSTDOPYY | YEN |
|
|
|
AFRDFDD | AFRDFDE | AFRDFDN | AFRDFDT | AFRDFDWN |
AFRDFMN | AFRDFMY | AFRDFWDX | AFRDFWKX | CATDFDD |
CATDFDE | CATDFDN | CATDFDT | CATDFDWN | CATDFMN |
CATDFMY | CATDFWDX | CATDFWKX | CRODFDD | CRODFDE |
CRODFDN | CRODFDT | CRODFDWN | CRODFMN | CRODFMY |
CRODFWDX | CRODFWKX | CSYDFDD | CSYDFDE | CSYDFDN |
CSYDFDT | CSYDFDWN | CSYDFMN | CSYDFMY | CSYDFWDX |
CSYDFWKX | DANDFDD | DANDFDE | DANDFDN | DANDFDT |
DANDFDWN | DANDFMN | DANDFMY | DANDFWDX | DANDFWKX |
DATE | DATEAMPM | DATETIME | DAY | DDMMYY |
DDMMYYN | DESDFDD | DESDFDE | DESDFDN | DESDFDT |
DESDFDWN | DESDFMN | DESDFMY | DESDFWDX | DESDFWKX |
DEUDFDD | DEUDFDE | DEUDFDN | DEUDFDT | DEUDFDWN |
DEUDFMN | DEUDFMY | DEUDFWDX | DEUDFWKX | DOWNAME |
DTDATE | DTMONYY | DTWKDATX | DTYEAR | DTYYQC |
ENGDFDD | ENGDFDE | ENGDFDN | ENGDFDT | ENGDFDWN |
ENGDFMN | ENGDFMY | ENGDFWDX | ENGDFWKX | ESPDFDD |
ESPDFDE | ESPDFDN | ESPDFDT | ESPDFDWN | ESPDFMN |
ESPDFMY | ESPDFWDX | ESPDFWKX | EURDFDD | EURDFDE |
EURDFDN | EURDFDT | EURDFDWN | EURDFMN | EURDFMY |
EURDFWDX | EURDFWKX | FINDFDD | FINDFDE | FINDFDN |
FINDFDT | FINDFDWN | FINDFMN | FINDFMY | FINDFWDX |
FINDFWKX | FRADFDD | FRADFDE | FRADFDN | FRADFDT |
FRADFDWN | FRADFMN | FRADFMY | FRADFWDX | FRADFWKX |
FRSDFDD | FRSDFDE | FRSDFDN | FRSDFDT | FRSDFDWN |
FRSDFMN | FRSDFMY | FRSDFWDX | FRSDFWKX | HHMM |
HOUR | HUNDFDD | HUNDFDE | HUNDFDN | HUNDFDT |
HUNDFDWN | HUNDFMN | HUNDFMY | HUNDFWDX | HUNDFWKX |
ITADFDD | ITADFDE | ITADFDN | ITADFDT | ITADFDWN |
ITADFMN | ITADFMY | ITADFWDX | ITADFWKX | JDATEMD |
JDATEMON | JDATEQRW | JDATEQTR | JDATESEM | JDATESMW |
JULDATE | JULDAY | JULIAN | MACDFDD | MACDFDE |
MACDFDN | MACDFDT | MACDFDWN | MACDFMN | MACDFMY |
MACDFWDX | MACDFWKX | MMDDYY | MMDDYYN | MMSS |
MMYY | MMYYN | MONNAME | MONTH | MONYY |
NLDATE | NLDATEMD | NLDATEMN | NLDATEW | NLDATEWN |
NLDATEYM | NLDATEYQ | NLDATEYR | NLDATEYW | NLDATM |
NLDATMAP | NLDATMDT | NLDATMMD | NLDATMTM | NLDATMW |
NLDATMWN | NLDATMYM | NLDATMYQ | NLDATMYR | NLDATMYW |
NLDDFDD | NLDDFDE | NLDDFDN | NLDDFDT | NLDDFDWN |
NLDDFMN | NLDDFMY | NLDDFWDX | NLDDFWKX | NLSTRMON |
NLSTRQTR | NLSTRWK | NLTIMAP | NLTIME | NORDFDD |
NORDFDE | NORDFDN | NORDFDT | NORDFDWN | NORDFMN |
NORDFMY | NORDFWDX | NORDFWKX | POLDFDD | POLDFDE |
POLDFDN | POLDFDT | POLDFDWN | POLDFMN | POLDFMY |
POLDFWDX | POLDFWKX | PTGDFDD | PTGDFDE | PTGDFDN |
PTGDFDT | PTGDFDWN | PTGDFMN | PTGDFMY | PTGDFWDX |
PTGDFWKX | QTR | QTRR | RUSDFDD | RUSDFDE |
RUSDFDN | RUSDFDT | RUSDFDWN | RUSDFMN | RUSDFMY |
RUSDFWDX | RUSDFWKX | SLODFDD | SLODFDE | SLODFDN |
SLODFDT | SLODFDWN | SLODFMN | SLODFMY | SLODFWDX |
SLODFWKX | SVEDFDD | SVEDFDE | SVEDFDN | SVEDFDT |
SVEDFDWN | SVEDFMN | SVEDFMY | SVEDFWDX | SVEDFWKX |
TIME | TIMEAMPM | TOD | WEEKDATE | WEEKDATX |
WEEKDAY | WEEKU | WEEKV | WEEKW | WORDDATE |
WORDDATX | YEAR | YYMM | YYMMDD | YYMMDDN |
YYMMN | YYMON | YYQ | YYQN | YYQR |
YYQRN | YYWEEKU | YYWEEKV | YYWEEKW |
|
Note: The JAVA and JAVAIMG devices do not support nested formats. If you create a custom format to use with these devices, do not nest existing formats in your new format.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.