MainframeSupports
tip week 26/2017:

Have you used the SORT command in ISPF EDIT/VIEW and discovered that numbers are ordered before letters and not opposite as we are used to in EBCDIC. If you have your ISPF systems programmer has set the sort order to be in ASCII instead of EBCDIC. If you have not noticed it you might get into serious trouble. Just imagine you sort your data using SORT in EDIT and then use the data as input to a program expecting data in EBCDIC order. This may lead to very unexpected results.

Actually SORT has for many years sorted data in a so-called National Language collating sequence, but I think many ISPF systems programmers has chosen to set the collating sequence to the good old EBCDIC order. Some installations has chosen to fit in the National Language Characters in their correct place, but at my installation the ASCII order has been chosen as collating sequence which occationally leads to unforeseen situations.

Fortunately it is possible to sort your data in EBCDIC order by setting HEX ON before you execute your SORT command. It is a somewhat akward solution and National Language Characters will most likely not be sorted correctly, but many Nordic installations are used to that. Next time you use the SORT command please notice the sort order. You may be surprised.

Previous tip in english        Forrige danske tip        Tip list