Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Specifying the sort sequence for CALL DML

SESAM/SQL normally sorts intermediate-result sets of retrieval statements on the basis of the EBCDI code. You can change this sort sequence.

The DBH module SESFSxx (xx= version number, for SESAM/SQL V9.1 the DBH module is called SESFS91) contains a table that specifies the sort sequence. The entries in this table have the format XL2'nnmm', where nn and mm are characters in hexadecimal notation. An entry in the XL2'nnmm' format specifies that the second character (mm) follows the first character (nn) in the sort sequence. The table has a total of 255 entries, which specify the sort sequence for all 256 characters of the EBCDI code.

If you want to specify a sort sequence other than the default, you can change the table entries in the source file of SESFSxx. In doing this, you must note the following:

  • In the FSORT macro, you can change only entries that adhere to the format XL2'nnmm'.

  • You cannot change the number of entries in the table.

  • Each character must be assigned a unique place in the sort sequence.


Example

The character “a” (X'81') is to come after “A”(X'C1') in the sort sequence:

Default tableChanged table
.
.
.
.
XL2'7F80'
XL2'7F80'
XL2'8081
XL2'8082'
XL2'8182'
XL2'8283'
XL2'8283'
.
.
.
.
XL2'C0C1'
XL2'C0C1'
XL2'C181'
XL2'C1C2'
XL2'81C2'
XL2'C2C3'
XL2'C2C3'
.
.
.
.


After changing the table, you have to compile the SESFSxx module and enter it in the SESAM/SQL module library. For a retrieval statement issued with sorting, the module library must contain a single module called SESFSxx at execution time.

Do not make any other changes to the table. The table is only taken into consideration during the sort if its sort sequence differs from that of the default table. Making changes that do not affect the sort sequence is therefore a waste of time.