I have a varchar column which contains the data at ‘bit' level.the data needs to be extract / transform at bit level and this will contain a Boolean value - 0/1. How can we handle using shell scripts
At source level(DB2 Database) we have a column of length 250 char ie varchar(250) so each char will hold a byte information and from this byte we need to extract bit level information.
Create a script to convert the DB2 character to an integer, presumably 32 through 255, and then run through bc.
Where $char is the value of the byte.
The output is binary, but you have to supply leading zeros to pad to 8 characters total.
Edit
Add 256 to $char before running bc, and the output will always be 9 characters the first being 1 which you can easily ignore or discard
Hello everyone.
I bought a dell laptop (XPS M1330) online which came without a hard drive. There is a Windows Vista Ultimate OEMAct sticker with product key at the bottom case. I checked dell website (here) for this model and it says this model supports both 32 and 64-bit version of Windows... (4 Replies)
Hi,
Here is the issue. From the program snippet I have Base: 0x1800000000, Size: 0x3FFE7FFFFFFFF which are of 40 and 56 bits. SO I used use bignum to do the math but summing them up I always failed having correct result.
perl interpreter info,
perl, v5.8.8 built for... (0 Replies)
I'm attempting to read a file that is composed of complex 32-bit floating point values on Solaris 10 that came from a 64-bit Red Hat computer.
When I first tried reading the file, it looked like there was a byte-swapping problem and after running the od command on the file Solaris and Red Hat... (2 Replies)
Hi All
Can anyone please suggest me how to remove the last byte from a falt file .This is from the last line's last BYTE.
Please suggest me something.
Thank's and regards
Vinay (1 Reply)
In my server migration requirement, I need to compare if one file on old server is exactly the same as the corresponding file on the new server.
For diff and comm, the inputs need to be sorted. But I do not want to disturb the content of the file and need to find byte-to-byte match.
Please... (4 Replies)