Be sure to ask this on the mvs-oe list, since an IBM Unix guy might see it there and give a better answer.
Kirk Wolf Dovetailed Technologies http://dovetail.com On Mon, Mar 12, 2018 at 4:55 PM, Kirk Wolf <k...@dovetail.com> wrote: > Seems like a really good question... you would think that there would be a > pointer somewhere. > > This is kind of a hack, but you could spawn /bin/env with no arguments and > redirect the output to an anonymous pipe and then read that into a buffer. > The output with be a repeated stream of "KEY=VALUE\n" > > The services would be: > > BPX1PIP - pipe() to create an unnamed pipe > BPX1SPN - spawn("/bin/env"....) direct stout to pipe write fd, stdin and > stderr to nothing (SPAWN_FDCLOSED). > BPX1OPN - open the input side of the pipe > BPX1RED* - repeatedly read the pipe until eof > BPX1CLO - close > > Assuming that your program is not authorized, I suggest you > set INHEMUSTBELOCAL in the inheritance structure for BPX1SPN so that > /bin/env will be run in the same address space, which will be a little > cheaper/quicker. > > You might also want to ask this on mvs-asm370. There are some guys there > that think that assembler is better than C for everything. They may have a > better answer than this :-) > > > > Kirk Wolf > Dovetailed Technologies > http://dovetail.com > > On Mon, Mar 12, 2018 at 4:13 PM, Frank Chu <fr...@colesoft.com> wrote: > >> Hi, >> >> Does anybody know if there is a control block chain that I can walk to >> find all of the envars that are define? I know there is a LE C function >> that can query for a specified envar but I can't use LE C. And there are >> circumstances where I do not have access to the parm list pointer that is >> passed to the executing program, so I can't rely on that guy to find the >> envars. I've also gone through the USS Callable Assembler Services Guide >> and it doesn't look like there is a service for this either. >> >> Thanks in advance. >> Frank >> >> -- >> Development Programmer >> ColeSoft Marketing >> www.colesoft.com >> Phone : 540.456.6164 >> Email : fr...@colesoft.com >> >> ---------------------------------------------------------------------- >> For IBM-MAIN subscribe / signoff / archive access instructions, >> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN >> > > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN