JNI trace can be enabled on start
up of CICS® Transaction Gateway
or a local mode application. Alternatively, JNI trace can be enabled
when the Gateway daemon is running using the ctgadmin command.
Set the following environment
variables before you start the
CICS Transaction Gateway on
UNIX and Linux or
Java™ Client
applications run in local mode on any platform:
- CTG_JNI_TRACE
- Use this environment variable to set the name of the JNI trace
file. This environment variable defines only the name of the JNI trace
file; it does not enable trace. There is no requirement to use a particular
extension for the file name. If a directory is not defined the file
is created in the current working directory.
- CTG_JNI_TRACE_ON
- Set this environment variable to YES (not case-sensitive) to enable
JNI trace. When CTG_JNI_TRACE is not defined
and CTG_JNI_TRACE_ON=YES, trace is written to stderr.
Use one of the following methods to enable JNI
trace:
- When you start the CICS Transaction Gateway on Windows, use the ctgservice command
to register startup override options. For example:
ctgservice -R -A-j-Dgateway.T.setJNITFile=filename
This
setting is defined in the Windows registry
and persists. To remove the startup parameters issue the command, ctgservice
-R. For more information, see the ctgservice command reference.
- When you start the CICS Transaction Gateway on UNIX and Linux, use
the ctgservice command to register startup override
options. For example:
ctgstart -j-Dgateway.T.setJNITFile=filename
where filename is
the name of the file to which trace output is to be sent. If you do
not specify a full path to the file, the location is <install_path>/bin.
- While the CICS Transaction Gateway is
running, use the ctgadmin command. For example:
ctgadmin -a trace -jnilevel=1 -jnifile=filename
If
a directory is not defined the file is created in the <product_data_path>
directory. For more information, see ctgadmin command reference.
- For Java Client applications
run in local mode, use Java to launch
your application and set the system property gateway.T.setJNITFile,
as shown in the following example:
java -Dgateway.T.setJNITFile=filename application
where
- filename is the name
of the file to which trace output is to be sent
- application is the
application to launch
You cannot enable
JNI trace through the Configuration Tool.