|
|
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.
Operation Notes
This intrinsic affects the logical record (or block for NOBUF files)
of the file last referenced by any intrinsic call, except an FPOINT
call, which affects the record prior to the last record referenced.
FUPDATE moves the specified information from the stack into this
record. The file containing this record must be opened with the update
aoption specified in the FOPEN/HPFOPEN call and the
file cannot have variable-length records. If RIO access is used, the modified
record is set to the ACTIVE state.
FUPDATE intrinsic fails with a CCL condition:
The FUPDATE intrinsic is not applicable to message files.
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. |
Related Information
|