On Mon, 13 Feb 2017 11:32:36 -0600, John McKown wrote:
>
> ... The COBOL
>> >program would use BPX1RED to read from the read_file_descriptor. The HLASM
>> >
>> Is this better than using BPXWDYN('ALLOC ...') the descriptor and using
>> conventional COBOL I/O)?
>
>Better? Not really. Just different. And doesn't require a MKFIFO with
>"random" name.
>
I was thinking of BPX1PIP and BPXWDYN( "alloc path('/dev/fd/[pipe output]')
..." ).
No generated pathname.
>> Does BPX1ATM dup() descriptors as spawn() does? If so the parent must
>> close() its copy of the input descriptor or it never sees EOF. Happens to
>> me all the time.
>
>BPX1ATM is "attach_and_exec_mvs", which basically seems, to me, to be a
>wrapper around the ATTACHX function. So the HLASM program is a subtask of
>the COBOL program.
>
I take that as "doesn't dup()."
>There is a BPX1SEL (
>https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxb100/sel.htm?view=kc
>) which I guess could be used. But, at least to me, using the BPX1ATM is
>conceptually easier. ...
>
You need something like select() if you want to monitor multiple
input streams, such as stdout and stderr from a child process.
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN