Because external software is sometimes required to write, update, or delete data in relative files, AcuXDBC provides a mechanism
that enables you to fetch a relative record number. You can add the GENESIS_VIRTUAL record as an extension to the basic system
catalog. The GENESIS_VIRTUAL record contains two virtual columns - TABLENAME and LASTROWNUMBER - which enable AcuXDBC to return
relative record positions.
Important: For information on adding the GENESIS_VITUAL record to your system catalog, see the information provided for the
-g option in the
xdbcutil utility topic.
You can use a returned record_number when doing select/update/delete work with a WHERE clause using record_number for direct
access.
- To retrieve the last relative record number
-
Note: lastrownumber becomes available after an INSERT.
- From genesis_virtual, select
lastrownumber - the value of the last record inserted for this connection - where
tablename='RELATIVEFILE'.
- Select
tablename,lastrownumber where
tablename='RELATIVEFILE'.
Note: Use single quotes around table names (and double quotes around column names).
- To return the data and the record_number
-
- Select
* from
RELATIVEFILE where
record_number is
=,
<=, or
>= some number.