View previous topic :: View next topic
|
Author |
Message |
Purnendu.it
New User
Joined: 11 May 2007 Posts: 57 Location: chennai
|
|
|
|
HI all,
i have got a requirement in which i have to change hexadecimal value in a big flat file to corresponding alphanumeric where i find these.can i
write a program to perform this operation.
hope you got my question.
Thank you. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi,
I think you may be misusing the terms Hex and Aupha/num.
Why don't you provide examples and show us what the hex looks like in memory and what it is changed to in its A/N form? That might give us what we need to help you. |
|
Back to top |
|
|
Purnendu.it
New User
Joined: 11 May 2007 Posts: 57 Location: chennai
|
|
|
|
HI,
its a big flat file so i dont know where this garbage values are.I mean to say that in file where ever i find some hexadecimal value i have to change it in alphanumeric.Is there any way where we read through the file
and change these hez value to alphanumeric.Hope you got what i said.
reply if u have any doubt.
Thanks |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Quote: |
its a big flat file so i dont know where this garbage values are. |
How can you say HEX values are garbage values?
Does the file has any LAYOUT? Dont say you had created a file without any layout. |
|
Back to top |
|
|
Purnendu.it
New User
Joined: 11 May 2007 Posts: 57 Location: chennai
|
|
|
|
i was not mean its a garbage value i mean to say that it is not the desired value.
as in file in general there has to be the value in the alphanumeric form
but in some places i find values like hexadecimal form.So can you please help me regarding this how to remove these values. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Sorry, we all might be dumb, but Your requirement is not clear, or rather the description is confusing..
point one... everything is hexadecimal
point two... nothing is garbage per se
but ... garbage would be
-alphabetic chars in a numeric field,
-non display char in an alphabetic fields,
-date wrong in se "2008/42/42",
numbers-dates out of application determined bounds
...
... add as many as You want
does Your record have some kind of layout yes/no
does Your record consist only of one big field,
to be considered not garbage only if everything is displayable yes/no
please be more specific on your definition of garbage
think in MF terms... files/records/layout |
|
Back to top |
|
|
nitesh.mulay
New User
Joined: 30 May 2006 Posts: 10 Location: Pune
|
|
|
|
I think the file will contain all the characters in normal form and not in hexadecimal form. you can view those characters in Hexadecimal format with "HEX ON" command.General character and hexadecimal character cannot be present at a time in a file.
Just check whether the values are hexadecimal values or junk characters (coming because of no initialisation etc) |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
Nitesh - see Enrico's point one, which is actually points one, two, three, ..., ten.
EVERYTHING is made of bits, and 8 bits make a byte, and a hexadecimal digit (?) is just a convenient way to represent 4 bits, so two of them represent a byte.
Binary, packed-dec, 1's complement, floating point, display - who cares - they're all hexadecimal in an 8-bit byte computer.
(In older days, we grouped by 3 bits, and base 8 was commonly used to represent the two 3-bit parts of a 6-bit field.) |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Purnendu.it wrote: |
its a big flat file so i dont know where this garbage values are. |
You can paste some of the records to give us an idea about records to which you are referring as HEX & the corresponding output. |
|
Back to top |
|
|
|