Re: Querying ISAM files
Posted in 1995
> If you don't write C-routines yourself you could even unscramble this > with 4GL. You will need a function to convert a character to its integer > representation. In the newest versions of 4GL I think I have seen this. > We have even used a for loop for this without any problems with speed. > Others will of course say you should use C, but for a kludge you do the > simplest things. > > I don't remember the exact representation of COMP 3 fields in Cobol, but > it shouldn't be very hard to find it out from you data. If i remember > this correctly it is straight binary coded with some sign indicator. > Probably the bytes are switched arround within each 16 bit word. > If this is not the case it is BCD with 2 digits per character stored > with binary values from 0 to 9 plus some special indicator for the sign. > Equally simple to decode. Err... could you give me some examples of just *how* you would do this in 4gl? I really have never seen 4gl used to get in beneath byte level. Love to know how you do this. akent@cix.compulink.co.uk (Andy Kent) ------------------------------------------------ Freelance Informix Database Specialist, Redland, Bristol, England