Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Unicode concept in UDS/SQL

&pagelevel(3)&pagelevel

Increasing internationalization means that the Unicode character set is vitally important, also in BS2000 and its applications. Detailed information about this is provided in the "Unicode in BS2000" manual.

Unicode combines all the text characters known worldwide in a single character set. Furthermore, Unicode is independent of the various vendors, systems and countries.

Unicode support in BS2000 is embedded in the existing concept for coded character sets (CCSs), see the "XHCS (BS2000)" manual.

A prerequisite for using Unicode is a suitable BS2000 system environment, the products COBOL2000 and CRTE currently being relevant for UDS/SQL, see the UDS/SQL Release Notice.

To support Unicode, UDS/SQL offers the NATIONAL data type. In COBOL this corresponds to the national items (PICTURE N(n), USAGE IS NATIONAL). COBOL and UDS/SQL support the Unicode variant UTF-16.

Details of this are provided in the "Design and Definition" manual and in the manuals on "COBOL2000 (BS2000)".

Use of Unicode (UTF-16) in existing UDS/SQL databases

The following options, among other things, are available to you for (partially) converting UDS/SQL databases to Unicode (UTF-16):

  • Adding national items

  • Adding a new record type

  • Replacing existing items

Adding national items

You can proceed as follows to add national items:

  • Add the data items in the schema and subschema DDL (see the "Design and Definition" manual).
    Define national items (Unicode, PICTURE N(n) USAGE IS NATIONAL) with the same number of characters as the existing alphanumeric items in the same record type. Please note that the length in bytes doubles here because a Unicode character occupies two bytes in UDS/SQL.

    You can also insert indicator fields to indicate the relevance of the new items.

  • Restructure the database using BCHANGE/BALTER (see the "Creation and Restructuring" manual). BALTER initializes the new item with (national) blanks.

  • In the records which are to be stored, fill the new item with national data. You can flag the old alphanumeric item as not relevant or empty or fill it with the previous alphanumeric data.

Adding a new record type

Instead of adding national items to existing record types you can also select the following procedure:

  • Define a new record type

  • Define the new national items which belong to an existing record type in the new record type

  • Link the new record type as a member record type with the existing record type

The advantages of this procedure compared to adding new items are:

  • Existing record types are not affected and consequently do not need to be changed

  • The database can be restructured very quickly using BCHANGE/BALTER

The disadvantage is:

  • Additional DML statements are required for the members. As a result the programming effort for the application increases and the performance deteriorates.

Replacing existing items

You can proceed as follows to replace existing items by national items:

  • Change the data items affected in the schema and subschema DDL (see the "Design and Definition" manual).
    Replace an existing alphanumeric item by a national item (Unicode, PICTURE N(n) USAGE IS NATIONAL) with the same number of characters.
    Please note that the length in bytes doubles here because a Unicode character occupies two bytes in UDS/SQL.

  • Unload the record types affected using BOUTLOAD (see the "Creation and Restructuring" manual)

  • Restructure the database using BCHANGE/BALTER (see the "Creation and Restructuring" manual)

  • If required, convert the BOUTLOAD output files from EBCDIC to Unicode using BS2000 products with an XHCS connection (e.g. PERCON or EDT)

  • Load the unloaded record types using BINILOAD (see the "Creation and Restructuring" manual)