Re: USS assembler program and envars

2018-03-16 Thread Paul Gilmartin
On Mon, 12 Mar 2018 16:55:09 -0500, Kirk Wolf wrote: > >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" > But be careful. If a programmer

Re: USS assembler program and envars

2018-03-14 Thread Binyamin Dissen
You would need to follow the CAA chain. For a standard LE task you would find the anchor in the TCB. CICS would have it in its control blocks. If you need it to be super clean, i.e., avoiding walking control blocks, you could probably fake a call to your routine with NAB=NO and then use the standa

Re: USS assembler program and envars

2018-03-14 Thread Peter Hunkeler
​>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 have not done an in-depth analysis on this but I don't

Re: USS assembler program and envars

2018-03-13 Thread Tom Marchant
On Tue, 13 Mar 2018 11:33:06 -0400, Thomas David Rivers wrote: >If you are a non-LE program that has been exec'd Given that Frank's email is Colesoft, I suspect that his requirement is not that of a normal program, but a debugger or a monitor. -- Tom Marchant -

Re: USS assembler program and envars

2018-03-13 Thread Don Poitras
There's an undocumented BPX function to get and set environment variables. The "OpenMVS extension" to the TCB has a non-gupi pointer that appears to be used. See SYS1.MACLIB(BPXZOTCB). In article <5571771324344028.wa.frankcolesoft@listserv.ua.edu> you wrote: > Hi Don, > Thanks for the info

Re: USS assembler program and envars

2018-03-13 Thread John McKown
On Tue, Mar 13, 2018 at 10:35 AM, Paul Gilmartin < 000433f07816-dmarc-requ...@listserv.ua.edu> wrote: > ​ > > On Tue, 13 Mar 2018 09:25:11 -0500, John McKown wrote: > > > >​... If you will look > >at the UNIX exec() function, BPX1EXC, you will see that the invoker _must_ > >set up the en

Re: USS assembler program and envars

2018-03-13 Thread Seymour J Metz
mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List on behalf of Thomas David Rivers Sent: Tuesday, March 13, 2018 11:33 AM To: IBM-MAIN@listserv.ua.edu Subject: Re: USS assembler program and envars Frank Chu wrote: > Hi, > > Does anybody know if there is a

Re: USS assembler program and envars

2018-03-13 Thread Paul Gilmartin
On Mon, 12 Mar 2018 19:26:06 -0500, Paul Gilmartin wrote: >On Mon, 12 Mar 2018 17:59:35 -0400, Don Poitras wrote: >> >> Try: >>LAA (PSA+0x4B8)->LCA->CAA->EDB->env var ptr array, ends with null ptr. >> >Since different processes spawned with _BPX_SHAREAS=YES may be executing >concurrently in the

Re: USS assembler program and envars

2018-03-13 Thread Thomas David Rivers
Frank Chu 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

Re: USS assembler program and envars

2018-03-13 Thread John McKown
On Tue, Mar 13, 2018 at 8:49 AM, Frank 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 "environm

Re: USS assembler program and envars

2018-03-13 Thread Frank
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. Frank -- For IBM-MAIN subscr

Re: USS assembler program and envars

2018-03-13 Thread Frank
Thank Kirk. The spawn and pipe was where I was heading down but I thought there must be a better way to get what I need. That will probably end up being the method of last resort. I'll give the mvs-oe list a try. Frank ---

Re: USS assembler program and envars

2018-03-12 Thread Paul Gilmartin
On Mon, 12 Mar 2018 17:59:35 -0400, Don Poitras wrote: > > Try: >LAA (PSA+0x4B8)->LCA->CAA->EDB->env var ptr array, ends with null ptr. > Since different processes spawned with _BPX_SHAREAS=YES may be executing concurrently in the same address space, but with different environment variables, how

Re: USS assembler program and envars

2018-03-12 Thread Don Poitras
Frank, Try: LAA (PSA+0x4B8)->LCA->CAA->EDB->env var ptr array, ends with null ptr. In article you 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

Re: USS assembler program and envars

2018-03-12 Thread Kirk Wolf
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 wrote: > Seems like a really good question... you would think that there would be a > point

Re: USS assembler program and envars

2018-03-12 Thread Kirk Wolf
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"