MPE/iX Intrinsics Reference Manual (32650-90875)

Chapter 6 281
Command Definitions (FLUSHLOG-GETUSERMODE)
FUPDATE
FUPDATE
NM and CM callable.
Updates (writes) a logical record in a disk file.
Syntax
I16V UDS I16V
FUPDATE(
filenum,buffer,length
);
Parameters
filenum
16-bit signed integer by value (required)
Passes the file number of the file to be updated.
buffer
user-defined structure (required)
Passes the record to be written in the update.
length
16-bit signed integer by value (required)
Passes the number of half words or bytes to be written to the file. A
positive value is in half words; a negative value is in bytes.
For files opened BUF:
•If
length
<= record size, the length is transferred in half words or
bytes and remaining portions of the record are padded with fill
characters.
•If
length
= 0, no transfer occurs, and the record address is overwritten
with default fill characters (blanks for ASCII files and null characters
for binary files).
•If
length
> record size, CCL (1) is returned and no transfer occurs.
For files opened NOBUF:
•If
length
<= block size, the length is transferred in half words or bytes
and remaining portions of the record are padded with fill characters.
•If
length
> block size, CCL (1) is returned and no transfer occurs.
Condition Codes
CCE (2) Request granted.
CCG (0) Request denied. An end-of-file condition was encountered during updating.
CCL (1) Request denied. An error occurred; the file is not residing on disk, or
length
exceeds the size of the block when multirecord mode is not in
effect.