 |
» |
|
 |
|
 |

Copyright (c) Digital Equipment Corporation 1992. All rights reserved
LAYERED PRODUCT: VAX PLI OP/SYS: VMS
SOURCE: Digital Customer Support Center
SYMPTOMS:
The built-in FLUSH subroutine in PL/I doesn't seem to flush the last buffer
when the PUT statement is used but it does when the WRITE statement is used.
ANALYSIS:
This behavior is correct. For data written with the PUT statement, PL/I
buffers this data in a "stream block". The $FLUSH system service, called
by the FLUSH() built-in subroutine, flushes only the RMS buffers. Since
PL/I has not written its stream block using RMS, the missing data is not
in the RMS buffer(s) to be flushed.
In the case of record I/O (WRITE), it manipulates RMS buffers directly and
does not use its own buffering, hence a $FLUSH on a record I/O statement
accurately reflects all I/O done to the file. This second is more important,
since shared access to files typically happens on record-oriented files (i.e.
relative or indexed sequential) rather than on stream files.
|
buy online or call 1.800.AT.COMPAQ
|
|