This document describes how to retrieve the ROWID of the most recently INSERTed row in an IDMS/SQL program.
This would be analogous to addressing the DBKEY field or using the ACCEPT DB-KEY verb against a network-defined database.
Release : 19.0
Component : CA IDMS/SQL
The GET DIAGNOSTICS statement can be used in a program to retrieve the ROWID of the most recently INSERTed row.
The attachment below is the source code of a batch program which shows how this can be done.
It performs an INSERT, retrieves the ROWID, and then issues a SELECT against the same table based on the retrieved ROWID.
This example requires the use of Virtual Foreign Key support.