Progress/400
Product Guide


Code Page Overview

Before you use the Progress/400 code page and collation functionality, make sure that you understand the difference between code pages and collation tables:

If you have written Progress code based on the ASCII collation sequence, you might need to modify it when you move it to the AS/400. For example, in EBCDIC collation, letters are sorted before numbers, while in ASCII, numbers are sorted before letters. Also, the encoding of the letters is not consecutive in EBCDIC, as it is in ASCII. A common technique when using ASCII collation is to code a range from ’a’ to ’z’ in order to include all letters. This technique might not function as expected with EBCDIC, because EBCDIC includes additional records in the specified range. The remote client can do EBCDIC collation by using the convmap file. The EBCDIC collation table must be added to the convmap.cp file. For information, see the Progress Internationalization Guide.

Progress/400 resolves these differences by converting automatically between code pages. To enable code-page conversion, do the following:

  1. Identify the code pages needed, based on your application requirements.
  2. If necessary, create an alternate collating sequence table.
  3. Assign the alternate collating sequence (ALTSEQ) tables.

This ensures that all characters look the same everywhere-database, screen, printer-and that all characters are sorted in the correct order. You must do this task before any data is entered into the database. If you make changes after data is entered, the data might become corrupted, and correcting the resulting problem could be very labor intensive.

Identifying Code Pages

To ensure compatibility of operation between environments, you might need to manage as many as nine code pages. These code pages can reside either on the AS/400 server machine or on the client machine, and can include code pages for the client and server operating systems, Progress products, and data files.

The example in Figure 8–1 illustrates the relationships among the code pages. It is based on an environment in which the AS/400 is configured for Spanish using code page IBM284.

Figure 8–1: Server and Client Code Page Relationships

The following code pages reside on the AS/400 server machine:

The following code pages reside on the Windows client machine:

Given the number of code pages required, data can be converted between code pages as many as four times before it arrives at its destination. In the Figure 8–1 example, the following conversions occur:

  1. The data is loaded as the IBM850 code page.
  2. It is converted to an ISO8859-1 Progress internal code page.
  3. It is stored in the AS/400 file as an IBM284 code page.
Alternate Collating Sequence (ALTSEQ) Tables

Alternate collating sequence (ALTSEQ) tables are the AS/400 equivalent of Progress collation tables. ALTSEQ tables define the order used to store indexes and specify how to do data sorting in general. They are important not only because they make it possible to accommodate language differences, but because they handle the two main differences between Progress databases and DB2/400 databases: case sensitivity and EBCDIC/ASCII collation. A common test to confirm whether collation is properly set up is to use a Progress 4GL query to retrieve the same set of records from a Progress database and a DB2/400 database; the test should return the same result for both databases. This is especially important when working with languages other than English, specifically those that include special characters or letters (for example, á).

You define collation differently for Progress clients than you do on the AS/400:

When you create the *PROEMPTY server schema with the DUPPRODB command, specify the ALTSEQ tables so that Progress/400 knows which tables to use when creating the AS/400 database files through the Progress/400 Data Dictionary.

NOTE: Using the wrong ALTSEQ table results in incorrect data sorting.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095