If you want to wait after you reach the end of file, you need to do this
(once) after you open the file
call intrinsic "FCONTROL" using MSGFILE, 45, TRUE-VAL
where MSGFILE is the FD/SELECT name of the file
and TRUE-VAL is:
01 TRUE-VAL pic s9(4) comp value 1.
----- Original Message -----
From: "Neil Harvey" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Monday, December 03, 2001 6:15 AM
Subject: [HP3000-L] Msg Files and Cobol
> I'd like to read (and eventually write) to msg files from a Cobol program.
> I have created the file, and can happily :echo things into it, and read
them
> with :print, Qedit etc.
> When I run it and the msg file is empty, it waits, as I would expect.
>
> As soon as the first record arrives, my program reads it, but I get a
> tombstone on the next read.
>
> END OF FILE ENCOUNTERED UPON READ [10,46] (COBERR 650)
>
> So, I'm asking for some guidance on how to read (and stay reading) a msg
> file in Cobol.
>
> Thanks
>
> Neil
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|