IBM Support

QMGTOOLS: RPG exception trace calling java

Troubleshooting


Problem

The DBGRPGJVA command in QMGTOOLS aids the user in outputting the JVM standard output and error to a file in an RPG environment.

Diagnosing The Problem

The DBGRPGJVA command will do the following:

  • Set the QIBM_USE_DESCRIPTOR_STDIO environment variable to a value of 'Y'
  • Set the QIBM_RPG_JAVA_EXCP_TRACE environment variable to a value of 'Y'
  • Sets the os400.stderr and os400.stdout to IFS path /tmp/rpgoutput
  • Sets stdin (0), stdout (1), and stderr (2) file descriptors.
  • Allows adding additional Java debug properties (verbose:gc, -Xdump.., -verbose:class)

Resolving The Problem

1. If the QMGTOOLS library has not yet been installed, you should refer to the following document for information on how to download and install the QMGTOOLS toolkit on your IBM i server. The following URL is contains additional information.

http://www-01.ibm.com/support/docview.wss?uid=nas8N1011297

NOTE : If you just downloaded the tool, this can be ignored. GO QMGTOOLS/MG and take option 12. If the build date is 2017 or later, please proceed to step 2. Otherwise, download the current version of QMGTOOLS library by following the steps in : http://www.ibm.com/support/docview.wss?uid=nas8N1020468

2. Add QMGTOOLS to the your library list (ADDLIBLE QMGTOOLS) and type GO MG.

3. Take Option 6 for CTA/EWS Menu




4. Take option 8 for Java menu



5. Take option 8 for Debug RPG/Java




6. Or, use command QMGTOOLS/DBGRPGJVA (Below is an example of properties, yours may be different depending on symptom of issue)




7. After running the above command in your interactive job, you will then call the RPG program interactively that you are having the problem with. There should now be more detailed exception events found in /tmp/rpgoutput/stderr.txt and stdout.txt files.

Understand that with RPG calling java, it produces a JVM once in the interactive jobs lifetime, so if there are changes that need to be made after attempting this, the user must sign off and sign back on, then run the command again so that the JVM is initiated with the properties.

For more information about the environment variables this program sets up, please reference http://www.ibm.com/support/docview.wss?uid=nas8N1014290



[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Document Information

Modified date:
18 December 2019

UID

nas8N1020903