16 3 4 Other Files with SUNI Fields

LANSA Application Design

16.3.4 Other Files with SUNI Fields

When an existing Other File contains fields which have the SUNI attribute, you may wish to re-load the file and its fields to use Nchar and Nvarchar. To do this, you need to remove all Char and String fields with the SUNI attribute from the file, and then reload the file.

Here's an example of how to do this. You can modify these instructions to suit your own needs:

Prepare for the change

1.  Check out the file and its fields that have the SUNI attribute.

2.  Create new fields that are copies of any SUNI fields on the file. These can be deleted later if not required.

3.  Create a new list that contains the SUNI fields and all objects that use the fields, as well as the new copied fields. Save this list to Excel.

4.  Make note of any *WEBEVENT functions that use SUNI fields in DISPLAY, REQUEST or POP_UP commands.

5.  Check out all the objects that use the fields.

6.  Print the file definition.

7.  Delete the SUNI fields from the file.

8.  Delete the SUNI fields from the repository.

Reload file creating new fields

1.  Reload the file. It should now have Nchar or Nvarchar fields replacing the original SUNI fields.

2.  Update the new fields with rules and triggers, multilingual descriptions, etc from the original fields: information will have been saved when you copied the original fields earlier.

3.  If any SUNI fields were used in DISPLAY, REQUEST or POP_UP commands in *WEBEVENT functions, you will need to continue to use SUNI fields here. The simplest technique is to take the copied field and copy it back to the original identifier, and then use this as a virtual field on the file. Remember that data loss may occur when Unicode field types are assigned to SUNI fields unless all data is known to be in the current code page.

Finish the conversion

1.  There is no guarantee that newly created fields will use the same identifier as the old field. If the identifiers are different, and the field is used outside of the file definition, there are two options:

  • Use the Excel list created earlier to change the objects to refer to the new field identifier instead of the old field identifier.

     or

  • Copy the field created by Load Other File to a new field with the old field identifier. Then use these as virtual fields on the file.

2.  Rebuild the OAM and the objects that use the field, and re-test functionality.

3.  Check everything back in.

Also See

16.1.2 Other Files

16.1.1 Unicode Field Types

Ý 16.3 Modifying Existing Applications to use Unicode

  •