MPE/iX Intrinsics Reference Manual (32650-90875)
Chapter 6 289
Command Definitions (FLUSHLOG-GETUSERMODE)
FWRITEDIR
FWRITEDIR
NM and CM callable.
Writes a specific logical record from the stack to a disk file.
Syntax
I16V UDS I16V I32V
FWRITEDIR(
filenum,buffer,length,lrecnum
);
Parameters
filenum
16-bit signed integer by value (required)
Passes the file number of the file to be written to.
buffer
user-defined structure (required)
Passes the record to be written. This structure should be large enough to
hold all of the information to be transferred.
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 is padded with fill
characters.
•If
length
= 0, no transfer occurs and the record address is overwritten
with default fill characters (blanks for ASCII files; null characters for
binary files).
•If
length
> record size, CCL (1) is returned and no transfer occurs.
For files opened NOBUF and nonmultirecord:
•
Length
is transferred in half words or bytes up to the file limit (ignores
all block boundaries) and remaining portions of the last block written to
is padded with fill characters.
lrecnum
32-bit signed integer by value (required)
Passes the relative number of the logical record, or block number for NOBUF
files, to be written. Zero indicates the first record.
Operation Notes
This intrinsic differs from the FWRITE intrinsic, the FWRITE intrinsic writes only the record
pointed to by the logical record pointer. Use the FWRITEDIR intrinsic only for disk files