Progress/400
Product Guide
Indexes and Keys
Progress indexes and DB2/400 file keys behave the same way. Queries that you develop for a Progress database work for DB2/400 database files.
If a DB2/400 file has more than one index, the first index processed is the primary index for that file. The first index can be the keyed physical file or a logical file. If a DB2/400 file has no index, Progress/400 processes records in relative record order. When creating indexes with the Progress/400 Data Dictionary, the first index created defaults to the physical file key and the primary index.
Progress allows a maximum of 16 fields when defining an index. The Progress length of the combined fields that make up an index must be less than 200 bytes. The Progress/400 maximum length is some number less than 200, depending on the number of key fields used.
Case-insensitive Indexes
By default, Progress is case insensitive, but you can define a field as case sensitive. DB2/400 is case sensitive, but the Progress/400 product provides support for case insensitivity.
To enable DB2/400 database files to support case insensitivity, you must specify a case-insensitive Alternate Sequence Collating Table when you run DUPPRODB on the AS/400. See "System Administration," for more information on user-defined collation tables.
If at least one index field is case sensitive, the entire index is case sensitive.
If all index fields are case insensitive and you specified a code-page value for the DUPPRODB ALTSEQCI keyword, that code-page value is specified as the DDS ALTSEQ parameter when the logical file is compiled. Otherwise, the ALTSEQCI keyword value of the
INSTALL
command is used.ASCII Versus EBCDIC Sort Order
The AS/400 uses the EBCDIC coding scheme, which uses a different sort order (collation sequence) than ASCII. For example, an index sorted according to ASCII values returns records in the order of 0 to 9, then A to Z, followed by a to z. An index sorted according to EBCDIC values returns a to z, then A to Z, followed by 0 to 9. Other characteristics of the EBCDIC coding scheme are that alphabetic characters are not contiguous and special characters are in a different order than in ASCII.
If you are moving a Progress database to the AS/400 and want to maintain an ASCII sort order for your indexes, specify an ALTSEQ table with an ASCII collation sequence when you run the Duplicate Progress Dictionary and DB2/400 Database (DUPPRODB) utility on the AS/400. See "System Administration," for more information on ALTSEQ tables.
If your application relies on an ASCII sort order when it accesses DB2/400 database files, create a logical file on the AS/400 that includes the appropriate ALTSEQ table so that the index sorts in ASCII collation sequence.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |