DELETE (XFILE)


9.0D

 

The DELETE instruction allows deletion of a record from an XML recordset. The statement format is as follows:

 

[label]

DELETE

{xfile},[{record}]

 

Where:

label

Optional. A Program Execution Label.

xfile

Required. A previously defined and opened XFILE variable from which the record is removed.

record

Optional. A previously defined Numeric Variable, Numeric Literal, or Expression that selects the record to be removed from the recordset.

Flags Affected: OVER

Note the following:

  1. The optional {record} parameter specifies the record number to be deleted. If {record} is not specified, the current record (if set) is used.

  2. If the {record} variable is not specified and the current recordset position is invalid, an I/O error occurs.

  3. If {record} is a numeric variable and it is less than zero (0), an I/O error occurs.

  4. If {record} is an arithmetic expression, the expression is evaluated and the result is used. If the result is less than zero, an I/O error occurs.

  5. If {record} is not specified, the record at the current position is removed and the position remains unchanged.

  6. The OVER flag is always cleared.

  7. If {record} is specified and the record is successfully located, it is removed. The current position is set to the position of the next record.

  8. If the record has already been deleted, no I/O error occurs.

 

 

See Also: XML Support



PL/B Language Reference CLOSE (XFILE) FLUSH (XFILE)