DeleteItem Method (DATASET)
10.8, PLBCMP GUI Only
The DeleteItem method finds and deletes a data item in a DATASET using a {key} or {index}. This method uses the following format:
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A DATASET object previously declared.
return
Optional. A Numeric Variable that returns a pass (zero) or fail (non-zero) value.
key
Optional. A Character String Variable or literal that contains a key string used to find a data item in the DATASET to be deleted. If both the {key} and {index} keywords are specified, the {key} is used to find the data item to be deleted.
index
Optional. A Numeric Variable, decimal number, or Numeric expression whose numeric value is used to find an item to be deleted.
flags
Optional. A Numeric Variable, decimal number, or Numeric expression that defines a bit mask value that is used to control DeleteItem method behaviorsFlags Affected: EOS, OVER, ZERO
Notes:
The EOS flag is always cleared.
The ZERO flag is set TRUE if the {return} value is zero when the method is completed successfully. If the method fails, the ZERO flag is cleared.
The OVER flag is set if the {return} numeric variable is too small requiring the value to be truncated.
The {flags} bit mask values found in plbmeth.inc are defined as follows:
|
Equate |
Value |
Description |
|
$DSF_DELITEM_KEYCASE_SENSITIVE |
0x00000001 |
Key string is case sensitive. |
When this method generates an error, the {return} variable contains an error code value as follows:
|
Error Code |
Description |
|
1 |
The data item could not be found! |
See Also: Method Syntax, DATASET Methods
![]() |