3.6.16 Create RRNO Column
Specify whether or not RRN functionality is required for this table. It is only available if the Table is a PC Other Table.
- YES specifies that the table requires the X_RRNO and X_UPID columns (@@RRNO and @@UPID fields), so that crossed-update checks can be made and LANSA RRN functionality can be used. An automatically incrementing column will be used for X_RRNO.
- NO indicates that the table does not require the X_RRNO and X_UPID columns. This option has been deprecated but is retained for backward compatibility.
- Removing the X_RRNO and X_UPID columns will limit the functionality that can be performed on a table.
Following is a partial list of limitations:
- Any command that uses RRN functionality will not be supported (for example: WITH_RRN and RETURN_RRN parameters).
- Virtual column derivation code may not work.
- The @@UPID column will have an undefined value.
- Crossed update checking will be limited: there is a remote possibility that an update made by another user will be overwritten (for example: two batch jobs simultaneously updating the same set of rows).
- If there is no primary key on the table, UPDATE and DELETE commands are not supported.
- Most templates shipped with LANSA will not work without these columns.
- SQL is only reusable for INSERT statements. However, with Create RRNO Column, it would be reusable for UPDATE, DELETE and re-read SQL statements also. That is, you get better performance on UPDATE and DELETE if you add the @@UPID and @@RRNO columns to the table.
Tips & Techniques
- For PC Other Tables, the initial value of Create RRNO Column can be set during the load of the table. It defaults to NO for new installations. The choice selected is remembered for the next load.
- IBM i: This option is ignored for LANSA tables. It must be YES (selected) for Other tables.
Note: With the introduction of setting Auto RRNO on LANSA tables, it is now mandatory to create the RRNO column on new LANSA tables. Setting Auto RRNO creates an Identity column to store the RRNO.
This provides a very fast method of generating the RRNO. It is much faster than the deprecated method of using an external table to store the next RRNO. Too many important LANSA features are unavailable (as listed above) when the RRNO is not used. You may consider that the RRNO is an unnecessary overhead, but it is so essential to LANSA that without it, much functionality becomes far more difficult for you to implement. In practice, both developing LANSA and execution of LANSA are at least as fast if not faster, with RRNO.
3.12 Import Tables from IBM i