On Sat, Oct 22, 2016 at 8:44 PM, John McKown <[email protected]> wrote:
> On Sat, Oct 22, 2016 at 3:08 PM, Paul Gilmartin < > [email protected]> wrote: > > > On Sat, 22 Oct 2016 12:33:39 -0500, Walt Farrell wrote: > > > > > >> address syscall 'ls -l' > > >> say rc retval > > > > > >That's what I would expect. "ls" is not a syscall command (at least in > > z/OS 1.13). It is a shell (address SH) command. > > > > > >List of syscall commands (z/OS 1.13): > > > http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/ > > BOOKS/bpxzb6a0/3.0?SHELF=all13be9&DT=20100628090654 > > >or > > > http://preview.tinyurl.com/grqcqc4 > > > > > My expectation, also. You might get to "ls" with "address SYSCALL spawn > > ls -l" > > or "address SYSCALL spawn sh -c ls -l". > > > > (Schematic examples; too simple to work as written.) > > > > Did wjs intend to imply that bpxwunix works under System Rexx? If so, > > that's > > the simplest approach. > > > > Whether he intended to or not, my testing shows that it does work. I am, > so far, using it to emulate the CA-OPS/MVS "global variable" facility. > Things such as: > > stdin.0=1 > stdin.1='value' > stdout.0=0 /* not needed */ > stderr.0=0 /* not needed */ > rc=bpxwunix("cat /dev/fd0 > >|/home/AXRUSER/vars/VARNAME",stdin.,stdout.,stderr.) /* set "VARNAME" to > 'value' > > and > > stdin.0=0 > stdout.0=0 > stderr.0=0 > rc=bpxunix("cat /home/AXRUSER/vars/VARNAME",stdin.,stdout.,stderr.) > if stdout.0 = 0 Then /* failed or not set */ > variable='VARIABLE' > Else /* succeeded */ > variable=stdout.1 /* ignore any extra lines */ > > Lots more error checking omitted. > > > > > > -- gil > > > > > > -- > Heisenberg may have been here. > > Unicode: http://xkcd.com/1726/ > > Maranatha! <>< > John McKown > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > Not being very fluent in 'nix, shouldn't there be a way to set/export variables in memory, avoiding the I/O with reading to/from a file? I could see the desire to flush the variables to disk for preservation, but repeated look-ups would probably be more efficient. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
