Run i5/OS PASE programs and procedures

You can read this topic for information and examples about starting an i5/OS™ PASE program in a job, and calling i5/OS PASE procedures from your ILE programs.

You can run your i5/OS PASE program in any of several ways:

Note: When you run an i5/OS PASE program on i5/OS, keep in mind that the i5/OS PASE environment variables are independent of ILE environment variables. Setting a variable in one environment has no effect on the other environment.

ILE procedures that let you work with i5/OS PASE programs

i5/OS PASE provides a number of ILE procedure APIs that allow your ILE code to access i5/OS PASE services (without special programming in your i5/OS PASE program):

Attach to ILE threads

You can call a procedure in an i5/OS PASE program from ILE code that runs in a thread that was not created by i5/OS PASE (for example, a Java™ thread or a thread created by ILE pthread_create). Qp2CallPase automatically attaches the ILE thread to i5/OS PASE (creating corresponding i5/OS PASE pthread structures), but only if the i5/OS PASE environment variable PASE_THREAD_ATTACH was set to Y when the i5/OS PASE program started.

Return results from i5/OS PASE to i5/OS programs

Using the i5/OS _RETURN() function, you can call an i5/OS PASE program and return results without ending the i5/OS PASE environment. This allows you to start an i5/OS PASE program and then call procedures in that program (using Qp2CallPase) after the QP2SHELL2 (but not QP2SHELL) or Qp2RunPase API returns.

Related concepts
Work with environment variables
Related information
i5/OS PASE ILE Procedure APIs
_RETURN()--Return Without Exiting i5/OS PASE