Code Comments
Programming Forum and web based access to our favorite programming groups.Answer, when it is MF's extension ALPHABET ... IS EBCDIC. (At least with Object Cobol, SE 2.2 and SE 4.0) Reference ASCII<->EBCDIC conversion, Appendix B, User Guide. (Which incidentally has 3 wrong entries, also in the online web page) This can be demonstrated by a SORT with COLLATING SEQUENCE ... Feed the sort with one character records composed of all (decimal) values from 0 to 255. The result is, err, interesting. What MF does is to take "printable" values plus some other values and "move" them into the first 128 values. The values 128 to 255 remain unchanged and get sorted to the end. MF maintain this is working as intended. I suppose the question is what is a collating sequence ? And how does this relate to an alphabet ? (OpenCOBOL allows both the MF behaviour and the full EBCDIC sequence, dependent on environment variable) Roger While
Post Follow-up to this message"Roger While" <simrw@sim-basis.de> wrote in message news:e3v108$i8l$01$1@news.t-online.com... > Answer, when it is MF's extension > ALPHABET ... IS EBCDIC. >... > I suppose the question is what is a collating sequence ? > And how does this relate to an alphabet ? Perhaps you are trying to SORT non-display data - or other values not defined in the the EBCDIC character set- and that is messing up your sort? Both ASCII and EBCDIC also have 'national' flavors, so 'language' is also a factor. I don't know about your specific circumtance here, but you can define an ALPHABET in the SPECIAL-NAMES paragraph and use that alphabet-name is the COLLATING SEQUENCE IS clause of the SORT statement. Perhaps not what you wanted, but also perhaps a way to solve your immediate challenge. MCM
Post Follow-up to this messageRoger, I don't know if it is still true, but MF used to have documentation that the "with collating sequence" was ignored in some types of SORT statements. Also, as Michael pointed out, there is no such thing as "EBCDIC" that doesn 't have national "flavors" (and/or flavours <G> ) -- Bill Klein wmklein <at> ix.netcom.com "Roger While" <simrw@sim-basis.de> wrote in message news:e3v108$i8l$01$1@news.t-online.com... > Answer, when it is MF's extension > ALPHABET ... IS EBCDIC. > > (At least with Object Cobol, SE 2.2 and SE 4.0) > Reference ASCII<->EBCDIC conversion, Appendix B, User Guide. > (Which incidentally has 3 wrong entries, also in the online web page) > > This can be demonstrated by a > SORT with COLLATING SEQUENCE ... > > Feed the sort with one character records composed of all > (decimal) values from 0 to 255. > > The result is, err, interesting. > What MF does is to take "printable" values plus some other values > and "move" them into the first 128 values. > The values 128 to 255 remain unchanged and get sorted to the end. > MF maintain this is working as intended. > > I suppose the question is what is a collating sequence ? > And how does this relate to an alphabet ? > > (OpenCOBOL allows both the MF behaviour and the full EBCDIC > sequence, dependent on environment variable) > > Roger While >
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.