Guardian Procedure Calls Reference Manual

You set the odd unstructured attribute with the FILE_CREATE_, FILE_CREATELIST_, or
CREATE procedure, or with the File Utility Program (FUP) SET and CREATE commands.
Structured files
Calling FILE_WRITEUPDATE64_ after FILE_SETKEY_ (or KEYPOSITION[X])
If the call to FILE_WRITEUPDATE64_ immediately follows a call to FILE_SETKEY_ (or
KEYPOSITION[X]) in which a nonunique alternate key is specified as the access path,
FILE_WRITEUPDATE64_ fails with error 46 (invalid key). However, if an intermediate call
to READ[X] or READLOCK[X] is performed, the call to FILE_WRITEUPDATE64_ is permitted
because a unique record is identified.
Specifying write-count for entry-sequenced files
For entry-sequenced files, the value of write-count must match exactly the
write-count value specified when the record was originally inserted into the file.
Changing the primary-key of a key-sequenced record
An update to a record in a key-sequenced file cannot alter the value of the primary-key
field. Changing the primary-key field must be done by deleting the old record
(FILE_WRITEUPDATE64_ with write-count = 0) and inserting a new record with the
key field changed (FILE_WRITE64_).
Current-state indicators after FILE_WRITEUPDATE64_
After a successful FILE_WRITEUPDATE64_, the current-state indicators remain unchanged.
Magnetic Tape Considerations
FILE_WRITEUPDATE64_ is permitted only on the 3202 Controller for the 5103 or 5104 Tape
Drives. This command is not supported on any other controller/tape drive combination.
FILE_WRITEUPDATE64_ is specifically not permitted on these controller/tape drive pairs:
3206 Controller and the 5106 Tri-Density Tape Drive
3207 Controller and the 5103 & 5104 Tape Drives
3208 Controller and the 5130 & 5131 Tape Drives
Specifying the correct number of bytes written
When FILE_WRITEUPDATE64_ is used with magnetic tape, the number of bytes to be written
must fit exactly; otherwise, information on the tape can be lost. However, no error indication
is given.
Limitation of FILE_WRITEUPDATE64_ to the same record
Five is the maximum number of times FILE_WRITEUPDATE64_ can be executed to the same
record on tape.
Example
In the following example, the application makes the necessary changes to the record in TAPE^BUF,
then edits the tape by calling FILE_WRITEUPDATE64_. The tape is backspaced over the record just
read, then updated by writing the new record in its place. NUM^READ indicates the number of
bytes to be written (ensuring that the same number of bytes just read are also written).
ERROR := FILE_WRITEUPDATE64_ ( TAPE^NUM , TAPE^BUF , NUM^READ , NUM^WRITTEN );
FILE_WRITEUPDATE64_ Procedure 541