Guardian Procedure Calls Reference Manual

WRITE^FILE Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Returned Value
Example
Related Programming Manual
Summary
The WRITE^FILE procedure writes a file sequentially. The file must be open with write or read/write
access.
WRITE^FILE is a sequential I/O (SIO) procedure and should be used only with files that have been
opened by OPEN^FILE.
Syntax for C Programmers
#include <cextdecs(WRITE_FILE)>
short WRITE_FILE ( short _near *file-fcb
,short _near *buffer
,short write-count
,[ short reply-error-code ]
,[ short forms-control-code ]
,[ short nowait ] );
Syntax for TAL Programmers
error := WRITE^FILE ( file-fcb ! i
,buffer ! i
,write-count ! i
,[ reply-error-code ] ! i
,[ forms-control-code ] ! i
,[ nowait ] ); ! i
Parameters
file-fcb
input
INT:ref:*
identifies the file to which data is written.
buffer
input
INT:ref:*
is the data to be written. buffer must be located within ‘G'[ 0:32767 ], the process data
area.
write-count
input
INT:value
is the count of the number of bytes of buffer to be written. A write-count value of -1
causes SIO to flush the block buffer associated with the file-fcb passed.
WRITE^FILE Procedure 1497