bit map in integer type and MSB issue
Posted in 1999
Topics: Stored Procedures & SPL, Migration, Import/Export & Data Conversion
I have a set of columns of type integer which holds a bit map. While copying data from Informix 5.02 on SCO Unix ODT 3.0 to Informix 7.2 on Sun Sparc using unload to / load from statements this bit map got all screwed - I suspect little and big endian issues got in the way. Now I need to write a procedure to swap the bytes in an integer field, but I have trouble with the sign bit. When loading from an ASCII file, empty field ("||") means just the sign bit set, while 0 ("|0|") means no bits set. The rest of the bits have their weight representation. How do I set the sign bit alone from within a stored procedure? Thanks for any ideas George Sent via Deja.com http://www.deja.com/ Before you buy.
ESQL/C. Get the SDK and write a small ESQL program to do this. Art S. Kagel vicherj@my-deja.com wrote: > > I have a set of columns of type integer which holds a bit map. > While copying data from Informix 5.02 on SCO Unix ODT 3.0 to Informix > 7.2 on Sun Sparc using unload to / load from statements this bit map got > all screwed - I suspect little and big endian issues got in the way. > > Now I need to write a procedure to swap the bytes in an integer field, > but I have trouble with the sign bit. When loading from an ASCII file, > empty field ("||") means just the sign bit set, while 0 ("|0|") means no > bits set. The rest of the bits have their weight representation. > > How do I set the sign bit alone from within a stored procedure? > > Thanks for any ideas > > George > > Sent via Deja.com http://www.deja.com/ > Before you buy.