[Info-vax] Cobol: Faster flushing of buffer to sequential file
George Cornelius
cornelius at eisner.decus.org
Fri Feb 4 19:12:42 EST 2011
In article <ihno8t$e9k$1 at speranza.aioe.org>, "Richard Maher" <maher_rj at hotspamnotmail.com> writes:
> Having said that, I knocked up this quick example to test and, you're right,
> it doesn't achieve the OP's desired results: -
I wrote a cobol program once, a few pages of code into a spiral notebook,
and it remains there to this day - I suppose 40 years later.
But I was curious, Richard, to try your program with $ CONVERT/SHARE, so
below are the results.
> On a flush, the EOF value written to the file header is only accessible to
> subsequent accessors. Any process that has the file open at the time of the
> flush cannot access the new EOF value without some explicit action.
This works, but only recognizes it after the close statement in MAHER.COB .
$ TYPE/CONTINUOUS/INTERVAL=seconds
George Cornelius
-----------------------------------------------------------------------------
[MAHER.EXE is sitting at the input prompt in another window]
GFC_EISNER> sho sym srl ! An RSX-ish lister
SRL == "DIRECTORY/SIZE/DATE/WIDTH=FILE:45"
GFC_EISNER> srl/sin
Directory USR_SCRATCH:[CORNELIUS]
MAHER.COB;2 12 4-FEB-2011 18:48:19.02
MAHER.COB;1 12 4-FEB-2011 18:45:40.05
MAHER.EXE;1 17 4-FEB-2011 18:48:46.53
MAHER.LIS;1 24 4-FEB-2011 18:48:39.94
MAHER.MAP;1 12 4-FEB-2011 18:48:46.51
MAHER.OBJ;1 12 4-FEB-2011 18:48:39.94
MY_FILE.DAT;1 0 4-FEB-2011 18:49:17.16
[...]
GFC_EISNER> conv/share my_file.dat sys$output:
GFC_EISNER> conv/share my_file.dat his_file.lis /stat
CONVERT Statistics
Number of Files Processed: 1
Total Records Processed: 0 Buffered I/O Count: 11
Total Exception Records: 0 Direct I/O Count: 5
Total Valid Records: 0 Page Faults: 22
Elapsed Time: 0 00:00:00.01 CPU Time: 0 00:00:00.01
GFC_EISNER> type his_file.lis
-----------------------------------------------------------------------------
More information about the Info-vax
mailing list