JNI tracing
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:
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.ctgservice -R -A-j-Dgateway.T.setJNITFile=filename - When you start the CICS Transaction Gateway on UNIX and Linux,
use the ctgstart command to register startup override
options. For example:
wherectgstart -j-Dgateway.T.setJNITFile=filenamefilenameis 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 /var/cicscli. - While the CICS Transaction Gateway is
running, use the ctgadmin command. For example:
If a directory is not defined the file is created in the <product_data_path> directory. For more information, see ctgadmin command reference.ctgadmin -a trace -jnilevel=1 -jnifile=filename - 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:
wherejava -Dgateway.T.setJNITFile=filename applicationfilenameis the name of the file to which trace output is to be sentapplicationis the application to launch
You cannot enable JNI trace through the Configuration Tool.