Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (W-Z)
Guardian Procedure Calls Reference Manual—522629-013
16-26
WRITEUPDATE[X] Procedures
WRITEUPDATE[X] Procedures
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Condition Code Settings
Considerations
Disk File Considerations
Magnetic Tape Considerations
Considerations for WRITEUPDATEX Only
Errors for WRITEUPDATEX Only
Example
Related Programming Manuals
Summary
The WRITEUPDATE[X] procedures transfer data from an array in the application
program to a file.
WRITEUPDATE is intended for use with 16-bit addresses, while WRITEUPDATEX is
intended for use with 32-bit extended addresses. Therefore, the data buffer for
WRITEUPDATEX can be either in the caller’s stack segment or any extended data
segment.
For disk files, WRITEUPDATE[X] has two functions:
1. To alter the contents of the record at the current position
2. To delete the record at the current position in a key-sequenced or relative file
WRITEUPDATE[X] is used for processing data at random. Data from the application
process’s array is written in the position indicated by the setting of the current-record
pointer. A call to this procedure typically follows a corresponding call to the READ[X]
or READUPDATE[X] procedure. The current-record and next-record pointers are not
affected by the WRITEUPDATE[X] procedure.
For magnetic tapes, WRITEUPDATE[X] is used to replace a record in an already
written tape. The tape is backspaced one record; the data from the application
process’s array is written in that area.