UPDATE (XFILE)
9.0D
The UPDATE instruction allows a record to be partially or completely updated in place. The statement format is as follows:
|
|
|
|
Where:
label
Optional. A Program Execution Label.
xfile
Required. A previously defined and opened XFILE variable in which data is updated.
field
Optional. The name of a field.
var
Optional. A previously defined Character String Variable, Numeric Variable, string or numeric ARRAY, or individual array element.
listctl
Optional. A supported list control.
;
Optional. indicates Partial I/O.
Flags Affected: OVER
Note the following:
This instruction modifies the record associated with the last successful READ, WRITE, or REPOSIT operation.
If the current file position is invalid, an I/O error occurs.
{field} is an identifier for the field to the updated from the {var} variable. The syntax for {field} can be one of the following:
|
field name |
|
$field name |
|
@{svar} where {svar} is a variable that contains the field name |
If a $ precedes the field name, the $ character is stripped off and the field name references an attribute field.
If no $ character precedes the field name, the field name references an element field or an attribute field.
If no {field} is specified, the name of the {var} variable is the field name.
No support for updating recordsets is available through update. The recordset must be access through a READ statement and modified using the other I/O statements.
The supported {listctl} controls are as follows:
|
Control |
Function |
|
*LC |
Data is written in the case in which it was stored |
|
*LL |
Set the Length Pointer to last non-blank character |
|
*PL |
Disable *LL (default) |
|
*UC |
Convert lower-case data to upper-case |
|
*ZF |
Zero-fill numeric variables |
|
*ZS |
Blank-fill zero numeric variables |
Using a semicolon (;) as a terminator for partial I/O has no effect.
See Also: XML Support
![]() |