On Sun, Nov 10, 2019 at 8:00 AM Pierre Fichaud <pr...@videotron.ca> wrote:

> I want to process Unix files in a sub-task.  The files are being written
> into by applications in other address spaces. I open the file (BPX1OPN).  I
> need to read all the records. errno EAGAIN seems to say that there are no
> new records in the file. So I would WAIT and retry. Does this make sense ?
> I also want to know if the file is still being written into. BPX1FST (file
> status) will return an area. Does the field ST_NLINK tell me how many
> "OPENs" have been done ? If I'm the only one connected to the file, would
> ST_NLINK have a value of 1?
>
> Thanks in advance, Pierre.
>
>
I don't know off hand the best way. However! You are describing what the
"tail -f" command does in Linux. The source for that is part of "coreutils"
and is at https://ftp.gnu.org/gnu/coreutils/ . It will be in C, but
hopefully it will make sense as to the technique used by some of the best
FOSS people on the planet.

-- 
People in sleeping bags are the soft tacos of the bear world.
Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to