The CCSID of the sequence is shown at the top and is always your job CCSID. If the collating sequence CCSID does not match your job CCSID, the previously specified or defaulted sequence is converted before it is shown on the Define Collating Sequence display. See “CCSIDs and collating sequences in Query for iSeries” on page 248 for more information on how CCSIDs affect the collating sequence.

You are shown a list of characters with a sequence number assigned to each character. Characters are assigned sequence numbers beginning with 10 and incremented by 10 in ascending order. A message stating what collating sequence is used is shown on the bottom of the display. You can use the following sequences as a base for defining your own collating sequence:

vHexadecimal sequence

vQuery for iSeries language sequence

vDefault sequence saved for your user ID

vSystem sequence

To do this, press F14 (Hexadecimal sequence), F15 (Language sequence), F16 (Use default), or F17 (System sequence).

Use the page keys to page through the list of characters. Certain characters cannot be displayed on some terminals; therefore, some sequence numbers may not have a character shown beside them. Press F11 and the hexadecimal value of each character is shown even if the character cannot be displayed on your terminal. You can use the Position to prompt to find a specific character in the list quickly. (You can enter the hex value of the character, if you know it and if your keyboard has this feature, or the character itself.)

To define your own collating sequence, change the sequence numbers beside those characters whose sequence you want to change. Each character must have a sequence number. You can specify the same sequence number for two or more characters—these characters are treated as equal when operations are performed on them.

After you have renumbered the characters in the sequence you want, press the Enter key. The list of characters is shown in the sequence you specified. Make sure the blank character (’40’X) is still first. To renumber the characters in this new sequence by amounts of 10, press F20. Using F20 to renumber makes it easier to specify a new sequence later. You must press the Enter key again to confirm that this is the sequence you want to use. The characters are renumbered, by amounts of 10, when you leave this display.

You can also save your collating sequence as a default by pressing F23 while you are still viewing this display.

Selecting a translation table in Query for iSeries

If your query needs a sequence that is not provided for with the available collating sequences, and creating a user-defined collating sequence does not produce the desired results, you may find that using a translation table will create the correct sequence for your query. Translation tables (similar to user-defined collating sequences) are created and used to translate data. The CCSID of any translation table created in a release prior to Version 2 Release 3 is 65535.

If you want to use a translation table, select option 4 on the Select Collating Sequence display. Enter the table name and the library that contains the table you want. If you would like Query for iSeries to list the existing tables for you, position the cursor to the Table prompt and press F4. An example of the Select Translation Table display follows:

116Query for iSeries Use V5R2

Page 128
Image 128
IBM SC41-5210-04 manual Selecting a translation table in Query for iSeries