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. Nils.Myklebust@ccmail.telemax.no NM-data, Dalsbergstien 7, N-0170 Oslo, Norway My opinions are those of my company > akent@cix.compulink.co.uk ("Andy Kent") writes: > Has anyone succeeded in using SQL under SE to query ISAM files used by a > Cobol application? > > I can get SE to see all the columns from the file as CHAR type, but the > COMP-3 numeric fields, not surprisingly, contain non-printing characters. > > I know you're not supposed to be able to do this; but I'm not too worried > about support implications as the system is being wound down anyway. I > just wondered whether anyone had come up with a kludge (a C routine, > perhaps) to unscramble the COMP-3 fields. > > To extract the data from the ISAM files and load it into a Real database > just takes too long.