3 6 16 Create RRNO Column

LANSA Technical

3.6.16 Create RRNO Column

Specify whether or not RRN functionality is required for this file. It is only available if the File is a PC Other File.

  • 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.

Warnings

  • Removing the X_RRNO and X_UPID columns will limit the functionality that can be performed on a file.
    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 field derivation code may not work.
  • The @@UPID field 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 file, 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. (With Create RRNO Column, it would be reusable for UPDATE, DELETE and re-read SQL statements too.) That is, you get better performance on UPDATE and DELETE if you add the @@UPID and @@RRNO fields to the file.

Tips & Techniques

  • For PC Other Files, the initial value of Create RRNO Column can be set during the load of the file. It defaults to NO for new installations. The choice selected is remembered for the next load. (Refer to Other Data Sources Load Options.)

Platform Considerations

  • IBM i: This option is ignored for LANSA files. It must be YES (selected) for Other files.

Note: With the introduction of setting Auto RRNO on LANSA files, it is now mandatory to create the RRNO column on new LANSA files. 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 file 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.

Also See

3.12 Load Other File

Ý 3.6 File Attributes