Variables, Environment variables – IBM SC33-1683-02 User Manual

Page 635

Advertising
background image

Chapter 21. Writing a program to tailor JVM execution
environment variables

Considerations common to all user-replaceable programs

Note that the comments contained in “Chapter 5. General notes about
user-replaceable programs” on page 401
apply to this chapter.

This chapter describes how to write a user-replaceable program to tailor the
environment variables that control the execution of the CICS Java® virtual machine
(JVM). The supplied program is called DFHJVMAT.

CICS supplies default environment variable settings in a partitioned dataset called
SDFHENV. You can edit this file with TSO, or you can write your own version of
DFHJVMAT to change any of the default values. DFHJVMAT uses the MVS
Language Edition (LE) commands

getenv

and

setenv

to change the variable values.

For example, you could use the following command to replace the CLASSPATH
environment variable with the specified value:

setenv(eclasspath, classpathval,1)

where:

char *eclasspath = "CLASSPATH";

char *classpathval =

"/usr/lpp/jdk114/j1.1/lib/classes.zip:/u/jtilli1/Java/test:.";

The JVM attributes JVMCLASS and JVMDEBUG must be defined using CEDA
DEFINE PROGRAM. You can use EXEC CICS or CEMT INQUIRE PROGRAM and
SET PROGRAM commands to modify them, as well as DFHJVMAT, before control
is passed to the JVM. Note that the

setenv

command has no effect on the CICS

PROGRAM definition and remains in effect only for the lifetime of the JVM.

If you write your own program to tailor JVM environment variables based on the
supplied version, it must be named DFHJVMAT and must be written in C.

You can use EXEC CICS commands within DFHJVMAT but you should be aware
that this might incur a processing overhead. DFHJVMAT must be defined as
threadsafe in its program definition, because multiple invocations of this module
may run in parallel.

Environment variables

You can reset the following environment variables in DFHJVMAT:

CHECKSOURCE

Tells the JVM to check the source file and .class file. If the .class file is out of
date, the JVM recompiles the source. This variable is set to NO in SDFHENV.

CICS_HOME

specifies the HFS directory that is used by the CICS JVM interface when
creating stdin, stdout and stderr files. A period is defined in SDFHENV, which
means that the current directory will be used. If CICS_HOME is not set at all,
then /tmp will be used as the directory.

© Copyright IBM Corp. 1977, 1999

603

|

|

|
|

|
|
||

|

|
|
|

|
|
|
|
|
|

|

|

|
|
|

|
|
|
|
|

|
|

|
|
|
|

|
|

|

|
|
|

|
|
|
|
|

Advertising