[Info-vax] Cobol: Faster flushing of buffer to sequential file

VAXman- at SendSpamHere.ORG VAXman- at SendSpamHere.ORG
Mon Feb 7 16:59:23 EST 2011


In article <VdjsNP0JGKcS at eisner.encompasserve.org>, cornelius at eisner.decus.org (George Cornelius) writes:
>In article <iiicpm$gaf$1 at speranza.aioe.org>, "Richard Maher" <maher_rj at hotspamnotmail.com> writes:
>> I might have missed something in your post but am I correct in understanding 
>> it to have confirmed the fail case? (i.e. yes, no one else can see the 
>> record until it has been flushed or the file closed)
>
>Sorry, Richard, I guess I was a bit terse in my posts.
>
>Yes, your program as written, as Hein has remarked, does
>not do anything to update the EOF pointer in the file
>header.  Looks as if it takes SYS$FLUSH or a close to do
>that.  And apparently $ CONVERT/SHARE does not use strong
>enough voodoo (FAB$M_UPD in FAB$B_SHR) to get past that.
>
>But, I was taken by surprise when a simple
>$ OPEN/READ/WRITE/SHARE from DCL could not only access
>all data you had written, but, after a $ CLOSE
>operation, make it available to other readers as
>well.
>
>So a SYS$FLUSH or CLOSE is needed to cause the header
>to be updated, but an external program can do it.
>
>Thus, all three options for changing the app work -
>OPEN,WRITE,CLOSE; OPEN ALLOWING ALL; and SYS$FLUSH -
>but the second requires a reader program that uses
>the correct sharing semantics, or at least some
>DCL in the background that periodically opens for
>shared write and then immediately closes again.

And it requires the creator or initial opener to permit write access.
As I said somewhere in this long thread, I'm not one to allow writers
to my application log files.  Thus, the SYS$FLUSH seems to be the only
way to get the EOF update if the file is to remain open but allow read
access by others.

-- 
VAXman- A Bored Certified VMS Kernel Mode Hacker    VAXman(at)TMESIS(dot)ORG

All your spirit rack abuses, come to haunt you back by day.
All your Byzantine excuses, given time, given you away.



More information about the Info-vax mailing list