On Tue, Mar 13, 2018 at 8:49 AM, Frank <[email protected]> wrote: > Hi Don, > > Thanks for the info but that looks like it will only work with LE > programs. The LCA and everything behind it are created when LE is first > initialized. Unfortunately, I cannot use LE. >
I think that there are two sets of "environment variables" in this situation. There are the UNIX shell environment variables, which is what I think you are asking about. And there are the Language Environment environment variables. I am not certain, but I think that these are really separate things, but sometime appear to be the same because the standard IBM UNIX shell (/bin/sh), which is a LE program, initialises the shell's environment variables from the LE environment variables. If you will look at the UNIX exec() function, BPX1EXC, you will see that the invoker _must_ set up the environment variables to be passed to the executed program. Exactly where this data area resides is not specified. That is, it could be "hard coded" in the executable, or in dynamic storage. And, for all that I know, the BPX1EXC processing could copy this data into an entirely different area. The C language has a number of exec...() variants. Some of which are explicitly passed the environment variables and other optionally pass the environment variable. What I'm getting at is that I am fairly sure that _UNIX_ shell environment variables may not be generally accessible in all situations. I have not done so, but I would likely try to see if my code could find the external variable "environ". But this may be LE only also. In addition, I really don't know what your code is doing and how it is being invoked. And, since I'm blathering on, I will also mention that not all UNIX processes have UNIX shell environment variables. If a non-UNIX program does a UNIX request and is dynamically "dubbed" as a UNIX process, then it will not have any non-LE environment variables. And, if not LE, it won't have any LE environment variables either. ref: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.bpxb100/exc.htm UNIX exec() callable service ref: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.bpxbd00/rtexe.htm C language exec...() > > > Frank > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > -- I have a theory that it's impossible to prove anything, but I can't prove it. Maranatha! <>< John McKown ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
