ROWID Pseudo-column

A pseudo-column is a column associated by CA IDMS with each table or view. Pseudo-columns are not part of the definition of a table or a view and do not show up as rows from the SYSTEM.COLUMN catalog table or as record elements of a record in a network schema. The ROWID pseudo-columns is only part of a SELECT * list if the WITH VIRTUAL KEYS option is used in the definition of the schema for the entities in the FROM parameter of the SELECT statement.
idmscu
A pseudo-column is a column associated by CA IDMS with each table or view. Pseudo-columns are not part of the definition of a table or a view and do not show up as rows from the SYSTEM.COLUMN catalog table or as record elements of a record in a network schema. The ROWID pseudo-columns is only part of a SELECT * list if the WITH VIRTUAL KEYS option is used in the definition of the schema for the entities in the FROM parameter of the SELECT statement.
For more information, see CREATE SCHEMA.
The ROWID pseudo-column has a special data type ROWID with a fixed length of 8 bytes. For any practical considerations, the ROWID data type can be considered equivalent to BIN(8). ROWID contains information about the storage location of the row in the database. Internally the ROWID is made up of the DBKEY of the underlying database record (first 4 bytes). The last 4 bytes contain the page information related to the DBKEY. The first 2 bytes of the page information contain the page group number, and the last 2 bytes contain the dbkey radix.
For more information about page information, see DB-Keys and Page Information
In a query containing a ROWID value, the page information that is required depends on the schema virtual key specification. If the query references a schema that includes virtual keys, any supplied ROWID value must contain valid page information. It is validated against the page information for the associated record/table. If the query references only schemas that do not include virtual foreign keys, a ROWID value can specify only the 4-byte dbkey value and the page information for the associated record/tableis used. ROWID is always displayed as an 8 byte field.
The value of ROWID is unique for each row of a base table; however, you cannot consider it to be a table's primary key because its value can change over the lifetime of the database. This could happen, for example, after an UNLOAD/RELOAD operation.
The ROWID provides unique access and the fastest access to a row of a table, no matter if the table is SQL- or non-SQL-defined.
The ROWID value is not persistent for the life of the database, but it never changes within a transaction or other controlled processes, if the row is not deleted.
The value of ROWID can be null (for example, as the result of an outer join operation).
A ROWID pseudo-column cannot be updated or inserted.
Views also have an associated ROWID pseudo-column. The value of a view's ROWID is the ROWID of the first base table in the decomposition of the view from left to right. The ROWID values of a view are not necessarily unique.
The ROWID pseudo-column is a CA IDMS extension of the SQL standard.
When to Use ROWID
Although ROWID can be used for SQL-defined tables, it is most useful for use with non-SQL-defined databases. Since such databases tend to have record types with no primary or foreign keys, identifying a specific row to be updated or deleted is often difficult. For such record types, it was often necessary to implement a table procedure to perform the update or deletion. The presence of ROWID pseudo-column makes the table procedure unnecessary, because it uniquely identifies each row of any non-SQL-defined table. In addition, within a transaction it can be used as a primary key of implicitly-defined constraints with virtual foreign keys. For more information on virtual foreign keys, see SQL Virtual Keys.