Friday, November 18, 2011

Collating Sequence


There are two famous Collating Sequence available in computers. IBM and IBM Compatible machine use EBCDIC collating sequence whereas most micro and many mainframe systems use ASCII collating sequence.  The result of arithmetic and alphabetic comparison would be same in both collating sequences whereas the same is not true for alphanumeric comparison.

EBCDIC (Ascending Order)
ASCII (Ascending Order)
Special Characters
Special Characters
a-z
0-9
A-Z
A-Z
0-9
a-z

Default collating sequence can be overridden by an entry in OBJECT-COMPUTER and SPECIAL NAMES paragraphs.
1. Code the PROGRAM COLLATING SEQUENCE Clause in the Object computer paragraph.    PROGRAM COLLATING SEQUENCE IS alphabet-name
2. Map the alphabet-name in the SPECIAL-NAMES paragraph as follows:
ALPHABET alphabet-name is STANDARD-1 | NATIVE                 

NATIVE stands for computer’s own collating sequence whereas STANDARD-1 stands for ASCII collating sequence.


No comments:

Post a Comment