Some features of SAS®9 software use Java, and your installation must be configured correctly to be able to use Java successfully. If SAS has not been configured correctly, you will see one of the following messages in your SAS log:
ERROR: Could not create Java VM. ERROR: proc javainfo did not run correctly
If you submit code from SAS® Enterprise Guide® or SAS® Information Map Studio to a z/OS server tier, you might see an error similar to the following in your SAS Enterprise Guide log:
The SAS MVA interface to the Java API could not be initialized.
There are several files and option settings that contribute to configuring SAS to use Java:
If you receive one of the errors above, here is a step-by-step debugging guide. Save the logs from any test code that you execute, because if you need assistance from SAS Technical Support they will provide valuable information about your Java configuration.
At a minimum, you should have the following options in your TKMVSENV file (path names will vary by site):
set TKJNI_OPT_PROXYPATH=/usr/lpp/SAS/SAS_9.1/BI/jproxy set TKJNI_OPT_LEOPTS='XPLINK(ON)' set TKJNI_OPT_LIBPATH=/java/bin/classic:/java/bin set TKJNI_OPT_DISPLAY='xservermachine:0'
* Display value of MEMSIZE and how it was set ; PROC OPTIONS OPTION=MEMSIZE VALUE DEFINE; RUN; * Display available memory and is it enough? ; %let memory = %sysfunc(getoption(memsize)); data _null_; x=&memory; put '*** AVAILABLE MEMORY IS: ' x comma19.0 ' *** ' @ ; if x < 512 * 1024 * 1024 then put / '*** INSUFFICIENT MEMORY ***' ; else put / ' AVAILABLE MEMORY IS GREATER OR EQUAL TO 512M. ' / ' MEMORY IS SUFFICIENT'; run; * Display value of JREOPTIONS ; PROC OPTIONS OPTION=JREOPTIONS VALUE DEFINE; RUN; * Display the entire CONFIG DDname in the SAS log. ; * This helps check the alignment of the lines. ; DATA _NULL_; INFILE CONFIG; INPUT; LIST; RUN; * Display the contents of the TKMVSENV DDname in the SAS log. ; DATA _NULL_; INFILE TKMVSENV; INPUT; LIST; RUN; * Try to create a java VM ; PROC JAVAINFO; RUN; |
Important: Make sure you have a working backup and a copy of your SAS configuration and TKMVSENV files before making the modifications described below. You will need to revert to your original copies of these files once the optional data step and %RMVINST macro are run.
Update your configuration file by inserting the value -verbose at the end of the JREOPTIONS SAS system option. You might need to realign the JREOPTIONS value string. As when you coded these values originally, keep in mind that no part of the JREOPTIONS value string can go beyond column 72; that there must be a non-blank character in column 72; that continuations must start in column 1 of the next line; and that method must be continued for as many lines as needed.
Add the following statements to the TKMVSENV member of the &prefix.TKMVSENV data set. Note: The values for the physical paths and file names used for these environment variables shown below are set for illustration purposes.
set TKJNI_OPT_TRACE=y asis set TKJNI_OPT_TRACEOUT=/tmp/trace.log asis set TKJNI_OPT_STDOUT=/tmp/stdout.txt asis set TKJNI_OPT_STDERR=/tmp/java.err asis
With the -verbose value added to the JREOPTIONS setting, you might get additional files created in your home directory named tkjni.err and tkjni.out that will have additional messages from the attempt to start Java. The file paths set in TKMSVENV tracing options will determine where the trace files will be written. You can browse all of these files with SPF, or read them by submitting the following code:
PROC JAVAINFO; RUN; * Display TKJNI.ERR and TKJNI.OUT files on the SAS log; FILENAME CMD pipe "pwd; cat tkjni.err;cat tkjni.out"; DATA _NULL_; INFILE CMD LENGTH=LEN END=LAST; LENGTH LINE $2000.; INPUT LINE $VARYING2000. LEN; PUT _INFILE_; RUN; * Display TRACE.LOG, STDOUT.TXT, JAVA.ERR files on the SAS log; FILENAME CMD pipe "cd /tmp; pwd; cat trace.log; cat stdout.txt; cat java.err"; DATA _NULL_; INFILE CMD LENGTH=LEN END=LAST; LENGTH LINE $2000.; INPUT LINE $VARYING2000. LEN; PUT _INFILE_; RUN; |
Note: Be sure to revert back to the original SAS configuration and TKMVSENV files that do not have the -verbose option and trace environment variables, once you have a chance to review the files generated.
*PROVIDES INFORMATION ABOUT ITMSCORE DIR AND OMIL JAR FILE; *VERIFY LOCATION OF itmscore DIRECTORY; FILENAME CMD pipe "pwd; cd /usr/lpp/SAS/SAS_9.1/USERID.ITRMW0/itmscore; pwd; ls -l; jar -tvf sas.solutions.itms.omil.jar"; DATA _NULL_; INFILE CMD LENGTH=LEN END=LAST; LENGTH LINE $2000.; INPUT LINE $VARYING2000. LEN; PUT _INFILE_; RUN; *DATA STEP TESTJAV TESTS ACCESS TO JAVA OBJECTS; *NOTE: IF TESTJAV FAILS, PLEASE COMMENT TO ENSURE; *EXECUTION OF MACRO RMVINST; DATA TESTJAV; *Make sure we can load a basic java object; DCL JAVAOBJ STRING("java/lang/String"); *Make sure we can load anything from sas.core.jar; DCL JAVAOBJ LOADER("com/sas/RB"); * Now try the FoundationDispatcher; DCL JAVAOBJ DISPATCH("com/sas/solutions/itms/omil/FoundationDispatcher"); RUN; * SAS IT Resource Management sites should uncomment this macro RMVINST, * invocation only if hot fix 311IS03 has been applied; %*RMVINST; * SAS IT Resource Management sites should uncomment this macro RMVINST, * invocation only if hot fix 311IS04 has been applied; %*RMVINST( metaserver=mybox.subdomain.domain.com, metaport=port, metauser=username, metapass=password); |
For more information about the RMVINST macro, see SAS Note #31327
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | Base SAS | z/OS | 9.1 TS1M3 SP4 |
Type: | Usage Note |
Priority: |
Date Modified: | 2011-09-10 13:55:23 |
Date Created: | 2007-10-09 14:30:56 |