MPE/iX Intrinsics Reference Manual (32650-90875)

Chapter 6 283
Command Definitions (FLUSHLOG-GETUSERMODE)
FWRITE
FWRITE
NM and CM callable.
Writes a logical or physical record or portion of a record from the stack to a file on any
device.
Syntax
I16V UDS I16V U16V
FWRITE(
filenum,buffer,length,controlcode
);
Parameters
filenum
16-bit signed integer by value (required)
Passes the file number of the file to be written on.
buffer
user-defined structure (required)
Passes the record to be written.
length
16-bit signed integer by value (required)
Passes the number of half words or bytes to be written to the record. If this
value is positive, it signifies half words; if negative, bytes. Zero indicates
that no transfer occurs.
If
length
is less than the
recsize
parameter associated with the record,
only the first
length
(half words or bytes) is written.
If
length
is larger than the logical record size and NOBUF (
aoption
in
FOPEN/HPFOPEN) is not specified, the FWRITE request is refused and CCL
(1) is returned. If NOBUF is specified,
length
cannot exceed the physical
record size unless the multirecord
aoption
is specified also.
If the multirecord
aoption
in FOPEN/HPFOPEN is specified, the excess half
words or bytes are written to succeeding physical records and
carriage-control is specified, the actual data transferred is limited to
recsize
minus one byte.
(ASC) For asynchronous devices, the physical data transfer is
byte-by-byte. If half words are specified, an even number of bytes is
output.
controlcode
16-bit unsigned integer by value (required)
Passes a carriage-control code, effective if the file is transferred to a line
printer or terminal (including a spooled file whose destination is a line
printer or a terminal). This parameter is effective only for files opened
with carriage-control specified.
The options are:
Bits Value/Meaning