• Post Reply Bookmark Topic Watch Topic
  • New Topic

Convertion of string from EBCDIC Hex to ASCII Hex  RSS feed

 
Tejeswar Peetha
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have some credit card information in EBCDIC Hex format. For some business logic, I need that information in ASCII Hex format
I have googled and got some clue but not succeeded

Please suggest me
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd suggest converting it--you're only dealing with 0-9; how difficult could it possibly be to convert it to ASCII?! And who's still using EBCDIC? And which version are they using?
 
Tejeswar Peetha
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David,

Please check the URL : http://www.spencerberus.com/ref_ebcdic.aspx


For Ex: In ASCII
303430303130353032353030323039303732343030303030393939363734303030303130313232303031543030303030303031

in ebcdic
F9F7F0F4F0F0F1F0F5F0F2F5F0F0F2F0F9F0F7F2F4F0F0F0F0F0F9F9F9F6F7F4F0F0F0F0F1F0F1F2F2F0F0F1E3F0F0F0F0F0F0F0F1F1

above conversion is not necessary to correct
please prefer that url for this purpose.

thanks you in advance
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I'm saying is that you're dealing with 10 EBCDIC values. Can you think of no way to convert between those values and ASCII values?
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You also need to be aware of which EBCDIC type you have (IBM, HP or AT&T) - some of the characters has different HEX
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(That was why I asked which version of EBCDIC was being used :)
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:(That was why I asked which version of EBCDIC was being used

Yeah, sorry about that
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!