Provides the record ID of the current or new record.
The &NDBRID system variable is set by some NDB NCL statements to indicate the Record ID of a record. It is set as follows:
The RID of the new record.
Set to 0.
Set to 0.
Set to 0.
Set to 0.
The RID of the current record or 0 if retrieving key field statistics.
Set to 0.
Set to 0.
Set to the RID of the first record returned by the scan, or zero if no records were selected. If the &NDBSCAN parameter RECLIMIT=1 was specified, &NDBRID will remain set to zero even if one record passes the scan.
Set to 0.
The RID of the updated record.
If a non-zero response is returned in &NDBRC, most statements set &NDBRID to 0. &NDBSCAN is the only exception to this rule.
Example: &NDBRID
&NDBGET MYDB FIELD=SURNAME VALUE=SMITH &NDBDEL MYDB RID=&NDBRID
This example deletes the first record (lowest RID) on database MYDB, with the field SURNAME = SMITH.
Notes:
If no NDB statements have been issued by the executing NCL process, &NDBRID is always null. Once any &NDBxxx statements have been issued, &NDBRID is always numeric.
&NDBRID is always cleared when the next &NDBxxx statement is executed. For this reason, the value should be saved in a user variable if other &NDBxxx statements must be executed before using the saved value.
Returns the relative position in an &NDBSCAN-built sequence on &NDBGET and &NDBSEQ statements.
| Copyright © 2009 CA. All rights reserved. |
|