16 3 Modifying Existing Applications to use Unicode

LANSA Application Design

16.3 Modifying Existing Applications to use Unicode

Is the partition RDMLX enabled?

You can only use 16.1.1 Unicode Field Types in an RDMLX partition. Read Enable Existing Partitions for Full RDMLX in the Visual LANSA Administrator's Guide and ensure you understand the ramifications of enabling the partition for RDMLX.

Changing field type from Alpha, Char or String to Nchar or Nvarchar

There is always some risk involved in changing a field type. Risks include:

  • Fields are used by external applications (including accessing tables on which the fields appear as columns) that will not know how to handle Nchar or Nvarchar data.
  • Fields are used in parts of LANSA that do not support Nchar or Nvarchar. For example, they may be used on RDML functions or as BIF arguments that do not support 16.1.1 Unicode Field Types.
  • Missing some objects that refer to the field, and not rebuilding or testing the objects.
  • The change yields no benefit as the data is not multilingual. For example code strings in lookup tables.
  • Assignment occurs between Unicode and non-Unicode fields necessitating even wider changes than envisaged.

Many of these risks can be reduced or removed by NOT changing the field type, and instead copying existing fields to new fields with the new field types, which can then be mapped to and from the existing fields to preserve existing functionality. This is the recommended approach for Alpha fields used in RDML functions or RDML files. Keep in mind that data loss may occur with mapping between Unicode field types and Alpha, Char, and String unless all data is known to be in the current code page.

If you change a field on a file from Alpha, Char or String to Nchar or Nvarchar, data is preserved correctly when you rebuild and reload the file data (with the IDE or via the Deployment Tool or LOAD_FILE_DATA BIF). If you change a field from Nchar or Nvarchar to Alpha, Char or String, data loss may occur.

Do you need to reload other file definitions?

You may also wish to reload existing Other Files so as to take advantage of the new field types available, especially Nchar and Nvarchar if the files contain Unicode columns.

To reload an RDML Other File as RDMLX, with RDMLX fields where appropriate, the original file definition must be deleted.

To modify an RDMLX Other File that has SUNI fields, so that you can now access those fields via 16.1.1 Unicode Field Types, refer to 16.3.4 Other Files with SUNI Fields.

More Information

For suggestions on how to modify existing applications to take advantage of Unicode, please review the following:

Also See

16.2.1 Field types and Language-specific data

16.2.2 Types of LANSA Applications

Ý 16. Internationalization with Unicode