Turn conceptual Java properties into definitive, concrete attributes.
Written by Tom Snyder
When working with RPG in different environments, such as production and test, you will most likely be working with different library lists and using different versions of programs and files. To provide a sanity check for yourself, you will want to ensure that you're using the correct programs and files by validating the objects that are being used by the job. This article shows you some methods that I use to verify similar Java attributes when using Java with RPG, such as the currently running version of JVM and the class path that is being used.
Recover from, and remove, error messages when using the QCMDEXC API to run CL commands.
Written by Bruce Vining
In last month's column, "The API Corner: Running CL Commands from RPG," you saw that an RPG program can easily run a CL command using any one of the three APIs: QCMDEXC, system, or QCAPCMD. Each of the APIs also provides the ability for the RPG program to detect when an error is encountered in the running of the CL command. The RPG programs found in the previous column, however, simply logged the fact that an error was encountered and then ended.
Just as a CL program running a CL command can use the Monitor Message (MONMSG) command to detect error conditions and then recover from the error, so too can your RPG programs.