Asynchronous Serial Communications Programmer's Reference Manual (32022-90052)
Chapter 9 253
Intrinsics Reference (cont)
FWRITE
FWRITE
Transfers a record of data to a file on any device.
Syntax
I16V UDS I16V U16V
FWRITE(filenum,buffer,length,controlcode);
Use
The FWRITE intrinsic transfers a logical record of data to a file on any
device. When programming for asynchronous devices this means
writing data to a terminal or printer. Completion status is indicated by
condition codes, which your program should always check.
This intrinsic is completed “logically”; that is, once data is passed to an
output buffer the call is considered to have completed and control is
returned to the calling program. If the operation of the output device
has been suspended through flow control, the actual writing of the data
may not have taken place. There is no programmatic way to determine
that printing has taken place.
Parameters
filenum 16-bit signed integer by value (required)
The file number of the file to be written to.
buffer user-defined structure (required)
Passes the record to be written.
length 16-bit signed integer by value (required)
The number of halfwords or bytes to be written to the
record. If this value is positive, it signifies halfwords; if
negative, bytes. If the number is zero, no data transfer
will occur.
NOTE
Whether or not “bytes” is specified, the physical data transfer will be on
a byte-by-byte basis for an asynchronous device. If halfwords are
specified, an “even” number of bytes are output.
controlcode 16-bit unsigned integer by value (required)
This parameter indicates the carriage control action to
be used when the file is transferred to a line printer or
terminal (including a spooled file whose ultimate
destination is a line printer or terminal). This