On Tue, Aug 29, 2017 at 11:37 AM, scott Ford <[email protected]> wrote:

> Guys/Gals:
>
> I was reading through IBM Unix services manuals and have a pipe question..
> If I as a STC ..issue a Unix command after a PIPE was established and
> retrieve output of the
> command, i *think* the answer is "yes". If so in a Single Thread STC would
> the STC wait for the response ?? or does it depend on your code..I am
> dealing with LE Cobol and want to utilize the nice features of Unix which i
> am somewhat familiar.
>

​You can set the descriptor to be non-blocking using the BPX1FCT call.
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.bpxb100/fct.htm

When you use the F_SETL option to set the file attribute to include the
O_NONBLOCK. When you do a read, BPX1RED, on this file descriptor, you will
get an EAGAIN response instead of waiting. Or you could use BPX1POL to see
if data can be read from (or written to) the given file descriptor without
waiting.
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.bpxb100/pol.htm

You could also use the BPX1SEL (select) call to see which FDs, if any, have
data available. If you are used to do BSAM READ statements where you can
WAIT on an ECB, the BPX1SEL can work in a similar manner.

I am not aware of any way to have a "exit routine" be scheduled as a
"signal" that data is available to be read, or written, without blocking.
IBM UNIX does not implement asynchronous I/O in UNIX.



>
> Regards,
> --
>
>
>
> *IDMWORKS *
>
> Scott Ford
>
> z/OS Dev.
>


-- 
Caution! The OP is an hyperpolysyllabicsesquipedalianist and this email may
cause stress to those with hippopotomonstrosesquipedaliophobia.

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to