Unique Key

LANSA Technical

Unique Key

Mandatory.

Specify whether or not the key fields nominated are to form a unique key to the file.

Default=NO.

Rules

  • NO (unchecked or not selected), indicates that the key fields nominated do not form a unique key to the file. This allows multiple records with the same key to exist in the file.
  • YES (checked or selected), which indicates that the key fields are to form a unique key to the file. This means that one (and only one) record can exist in the file for any given key value.

Tips & Techniques

  • When defining a new logical file over a physical file that already contains records and using the YES option make sure that there are no duplicate records (i.e.: key values) already in the file. If duplicate records do exist, then the "make operational" job will fail as this logical view cannot be loaded because of the duplicate records. The job log will indicate the cause of this problem. To correct, remove or change the duplicate records.
  • LANSA automatically handles duplicate key errors and there is no need for user logic to handle or check for them.

Ý 3.4.1 Logical View Definition