4 10 1 Other File Concepts

Visual LANSA

4.10.1 Other File Concepts

Load Other File creates a file definition with LANSA fields representing the columns in the table. The fields may be existing fields or they may be created when the file definition is loaded. Existing fields are only used if there is an exact match of the field name, data type, length, number of decimals, etc. Any variation from existing fields will cause a new field to be created.

Some native database types are not supported by LANSA, and Load Other File will automatically skip loading columns of these types. If you will be inserting data into the file via LANSA applications, you must ensure that these skipped columns have a default at the database level.

If the primary key contains a skipped column, an IBM i Other File will usually be defined in LANSA with no primary key. For PC Other Files, if another unique index exists, this may be loaded as the primary key and may also be loaded as a logical view.

If a logical file has a skipped column as one of its keys, the logical file will not be loaded.

When loading an other file in an RDMLX-enabled partition, the full range of field types supported by LANSA is available, regardless of the Available field types in the partition maintenance dialog. This allows you to automatically use the full features of LANSA to support Other Files, without having to be concerned about developers using new field types in other applications.

Occasionally, you may find that Load Other File creates a field that is not the type or length you expected, or perhaps you expected it to reuse an existing field. The solution is to add a virtual field to the file that converts the loaded field to what you expected. These fields will be preserved if the file is reloaded.

When loading DateTime fields in an RDMLX-enabled partition, Load Other File assumes that the field will be stored and displayed in the local time zone. If this is not the case, add the SUTC and/or DUTC attributes to the field. For further details, refer to Datetime in the Technical Reference Guide.

After loading Other files, you may change keyboard shift settings for some Other File fields. To do this, just open them in the LANSA Editor, go to the Field Definition tab and select the suitable keyboard shift values for them.

LANSA cannot make use of an Other File that contains only fields of type BLOB or CLOB, as it requires other fields to be used to query the BLOB or CLOB fields.

When loading other files, LANSA will recognise an Identity (Autonumber) column if one exists on the file. Refer to Identity columns.

There are many database and table-specific reasons why a column or table cannot be inserted or updated. If you attempt to update or insert a row into an Other file, and an error not related to LANSA is returned, you need to investigate the cause. Validations that the database may perform are not checked by LANSA and so the database may reject the data with a fatal error. Rules should be added to LANSA to perform these checks. If the cause cannot be avoided from within LANSA, you will only be able to read the table. For PC Other Files, you may delete a problematic field from the file definition, or mark the file as allowing read access only.

Also See

4.10.2 PC Other Files

4.10.3 IBM i RDMLX Other Files

4.11 LANSA Internal Tables

Ý 4.10 Load Other File