Identity columns

Visual LANSA

Identity columns

There may only be one Identity column per file. If the table being loaded actually has multiple identity columns, Load Other File will only count the first identity column loaded as an Identity column

Identity columns cannot be set to a specific value on insert or update. If an identity column is one of the primary key fields, it must be specified in the FIELDS(…) parameter of the INSERT command. However, the value in the field will not be inserted into the table, and the value of the field after the INSERT will not reflect the value that was actually inserted.

They are automatically generated on insert. Note: there is no way to retrieve the value without re-reading the row that was just inserted. To re-read the row, you will need to ensure the file has a primary key or unique logical file or index that does not contain the identity column.

Note: When compiling IBM i Other Files on platforms other than IBM i, if you choose to drop the table and reload the data, identity column values will be regenerated.

Also See

4.10.1 Other File Concepts

Create RRNO Column

Ý 4.10.1 Other File Concepts