Work with environment variables

i5/OS™ PASE environment variables are independent of ILE environment variables. Setting a variable in one environment has no effect on the other environment.

However, you can copy variables from ILE into i5/OS PASE, depending on the method you use to run your i5/OS PASE program.

Environment variables in an interactive i5/OS PASE session

ILE environment variables are passed to i5/OS PASE only when it is started with QP2SHELL() and QP2TERM(). Use the Work with Environment Variables (WRKENVVAR) command to change, add, or delete environment variables as needed before starting i5/OS PASE.

Environment variables in a called i5/OS PASE session

When i5/OS PASE is started from a program call (with the Qp2RunPase() API), you have complete control over the environment variables. You can pass environment variables that bear no relationship to the ILE environment from which you called the i5/OS PASE program.

Copy environment variables to ILE before running a CL command

You can copy i5/OS PASE environment variables to the ILE environment before you run a CL command using an option on the systemCL() runtime function. This is also the default behavior of the i5/OS PASE system utility.

Related reference
Run i5/OS PASE programs and procedures
Related information
QP2SHELL() and QP2SHELL2()--Run an i5/OS PASE Shell Program
QP2TERM()--Run an i5/OS PASE Terminal Session
systemCL()--Run a CL Command for i5/OS PASE
i5/OS PASE environment variables