I want to write a sequential ASCII output file and be able to display ($TYPE) the file while the image is running and the file is open.
By using fopen(fp, mode, "shr=get", "rat=cr", "rfm=var", "ctx=rec") with "w" or "a" mode, I can avoid "file locked by another user."
But even using fflush(fp) and/or fsync(fp), the output isn't being written to the disk until the file is closed. A $DIR on the file always appears as 0/<allocated> and $TYPE returns no
I'm doing this with OpenVMS 7.2-1 and DECC 6.0, but I see the same behavior with later versions.
What am I missing? How do I get the data written to the disk? I looked at the freeware examples, but they seem to address only making sure the buffers are flushed before the file is closed. I need to be able to examine the file at any time.
(9886) Opening a file for shared access?
(9886) Opening a file for shared access?
Last edited by marty.stu on Thu Aug 18, 2022 10:03 am, edited 1 time in total.
Re: (9886) Opening a file for shared access?
(2867) and FAQ cover what appears to be a variant of this particular topic, and specifically a discussion of reviewing the contents of an output file while the application is running. This involves setting up the RMS file open operation for full file sharing, of course.
Last edited by marty.stu on Thu Aug 18, 2022 10:09 am, edited 2 times in total.