Calling IBM i programs and procedures from your IBM PASE for i programs

PASE for i provides methods for calling ILE procedures, Java™ programs, OPM programs, IBM® i APIs, and CL commands that give you integrated access to IBM i functions.

General configuration requirements for IBM i programs and procedures

When you make calls from the PASE for i program environment to the IBM i environment, you should generally ensure that the program that is being called is compiled with *CALLER for the activation group, for the following reasons:

  • Only code that runs in the activation group that started PASE for i (called by the Qp2RunPase API) can use ILE APIs, such as Qp2CallPase, to interact with the PASE for i program.
  • The ILE run time might end the entire job (also ending PASE for i) if it needs to destroy an activation group in a multithreaded job (and all jobs created by PASE for i fork are multithread-capable). By using ACTGRP(*CALLER), you can prevent your job from ending before you want it to end.

You can avoid problems with running in a multithread-capable job by using the systemCL() runtime function to run a CL command (including the CALL command) in a separate job that is not multithread-capable.