Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to convert hexadecimal to alphanumeric

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Tue Jan 08, 2008 10:59 am    Post subject: how to convert hexadecimal to alphanumeric
Reply with quote

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
View user's profile Send private message

mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Jan 08, 2008 11:39 am    Post subject:
Reply with quote

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
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Tue Jan 08, 2008 12:33 pm    Post subject:
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Tue Jan 08, 2008 12:37 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Tue Jan 08, 2008 4:55 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Tue Jan 08, 2008 5:04 pm    Post subject: Reply to: how to convert hexadecimal to alphanumeric
Reply with quote

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
View user's profile Send private message
nitesh.mulay

New User


Joined: 30 May 2006
Posts: 10
Location: Pune

PostPosted: Tue Jan 08, 2008 5:08 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 962
Location: Richmond, Virginia

PostPosted: Tue Jan 08, 2008 6:31 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Jan 08, 2008 7:17 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us