Troubleshooting
Problem
Resolving The Problem
This document provides a technique that can be used to turn on JDBC tracing for JVMs launched in an RPG program.
It is possible for native IBM iSeries RPG programs to call the JNI_CreateJavaVM() API to launch a Java program. In this environment, it is possible to provide JVM arguments for JDBC tracing without requiring a change to the native program. This is accomplished by using the QIBM_RPG_JAVA_PROPERTIES environment variable. The environment variable should be added before calling the RPG program that launches a JVM.
Native JDBC:
ADDENVVAR ENVVAR(QIBM_RPG_JAVA_PROPERTIES) VALUE('-Djdbc.db2.trace=4;-Djdbc.db2.trace.config=file:///somedir/trace.txt;')
Toolbox JDBC:
ADDENVVAR ENVVAR(QIBM_RPG_JAVA_PROPERTIES) VALUE('-Dcom.ibm.as400.access.Trace.category=all;-Dcom.ibm.as400.access.Trace.file=/somedir/trace.txt;')
NOTE: The final semi-colon is required in both examples. When this property is read, the final character in the value is considered the delimiter for multiple properties. If the final semi-colon is omitted, the properties will not be properly set.
Related Information
Historical Number
401887427
Was this topic helpful?
Document Information
More support for:
IBM i
Component:
Data Access
Software version:
All Versions
Operating system(s):
IBM i
Document number:
637851
Modified date:
28 April 2025
UID
nas8N1015185