Questions tagged [ebcdic]

Extended Binary Coded Decimal Interchange Code (EBCDIC) is a set of 8-bit character encodings.

Extended Binary Coded Decimal Interchange Code (EBCDIC) is a set of closely related 8-bit character encodings (code pages) used primarily on IBM mainframe operating systems such as z/OS, OS/390, VM and VSE, as well as IBM midrange computer operating systems such as OS/400 and i5/OS (see also Binary Coded Decimal).

208 questions
5
votes
2 answers

Decoding Ebcdic

I'm being passed data that is ebcdic encoded. Something like: s = u'@@@@@@@@@@@@@@@@@@@ÂÖÉâÅ@ÉÄ' Attempting to .decode('cp500') is wrong, but what's the correct approach? If I copy the string into something like Notepad++ I can convert it from…
g.d.d.c
  • 46,865
  • 9
  • 101
  • 111
5
votes
4 answers

Java: Convert String to packed decimal

new here! Situation: I'm working on a project which needs to communicate with an AS/400 server. My task is to basically handle the requests which will be sent to the AS/400 server. To do this, all the user input should be in EDCDIC bytes. Problem: I…
mpmp
  • 2,409
  • 4
  • 33
  • 46
4
votes
2 answers

How to unpack COMP digits using Java?

I had found this useful link for unpacked COMP-3 digit, but i need to unpack COMP digit this time, is anyone know how to unpack it? Thanks a lot!
Michael Ouyang
  • 1,767
  • 1
  • 11
  • 19
4
votes
1 answer

How can I get a parser generated by ANTLR3.5 in C to work in an MVS EBCDIC environment?

We are using ANTLR 3.5.2 on linux to generate a parser in C. We have been able to compile and link the generated C parser and the ANTLR C runtime on z/OS with the LE C compiler. Of course, we'd like the parser to be able to work in the EBCDIC…
4
votes
4 answers

Java comparator for String in EBCDIC encoding

I have come across a requirement where I need to convert a string to EBCDIC encoding and then sort it. We need to sort it with EBCDIC because the string has to go in mainframe. The string I will sort will have only alphabets in captial and integers…
Akshay
  • 1,735
  • 6
  • 21
  • 29
4
votes
1 answer

Convert Mainframe Binary to Ascii Using any Open Source Code or Tool

How can I convert a mainframe binary file (EBCDIC) having cobol copybook as record layout information to ASCII file by keeping in mind regarding the packed and zoned decimal format using any Java API or Open source tool?
Binary01
  • 695
  • 5
  • 11
3
votes
0 answers

Do any monospace Unicode fonts include the IBM PUA characters for EBCDIC code page 310?

Do any (preferably, open-source) monospace Unicode fonts include the IBM Private Use Area (PUA) characters for EBCDIC code page 310? For example: U+F892; EBCDIC code page 310 byte value X'81', GCGID SF630000, "Double Vertical, Bar Graphic". (Look…
Graham Hannington
  • 1,749
  • 16
  • 18
3
votes
1 answer

Map Unicode characters to similar EBCDIC 1047 characters automatically

I'm trying to encode a string that has characters not supported by the target encoding (CP 1047). Is there a standard/common/easy way of mapping those characters to a cp1047 equivalent? For example, the text has a fancy double quote character (”)…
tom
  • 694
  • 4
  • 10
3
votes
1 answer

Mainframe MQ to Standalone JMS in EBCDIC

From a Java app I'm trying to browse messages from a mainframe IBM MQ queue (EBCDIC messages). I need to browse messages, not consume them. Here is the code: JmsFactoryFactory ff =…
Stephaneuh
  • 31
  • 5
3
votes
1 answer

Decode ebcdic to ascii/readable text in python

I have a IBM mainframe file encoded in 'cp500' (I was informed) which is to be decoded to ascii or readable text. The file is taken from unix server transferred to windows using IPSwitch tool. I already tried the below codes and couldn't achieve…
Harinie R
  • 307
  • 2
  • 3
  • 13
3
votes
3 answers

How to read EBCDIC data with a non standard codepage, and not mess up numbers?

Here is one for the old(er) hands :-) I'm reading a binary dump from a mainframe DB2 table. The table has varchar, char, smallint, integer and float columns. To make it interesting, the DB2 uses code page 424 (Hebrew). I need my code to be…
GilShalit
  • 6,175
  • 9
  • 47
  • 68
3
votes
1 answer

Write Unicode strings to a file with COBOL

We're in the process of updating our COBOL programs running on an IBM Mainframe (z/OS) to support non-latin characters. I'm struggling a bit with understanding how COBOL processes UTF-16 characters defined as PIC N. I need to update a field…
Chris
  • 43
  • 6
3
votes
2 answers

How do I check whether character constants conform to ASCII?

A comment on an earlier version of this answer of mine alerted me to the fact that I can't assume that 'A', 'B', 'C' etc. have successive numeric values. I had sort of assumed the C or C++ language standards guarantee that this is the case. So, how…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
3
votes
3 answers

Conversion from EBCDIC to UTF8 in Linux

I have imported with Perl a table from our database AS/400 DB2. The problem is that the string are encoded in EBCDIC Latin-1 (italian language). How can I convert the resulting file to plain utf-8 in Linux bash?
luca76
  • 813
  • 1
  • 10
  • 20
3
votes
1 answer

ASCII to EBCDIC Character Incoding

While converting ASCII String to EBCDIC: System.out.println(new String("0810C2200000820000000400000000000000052852304131419391011590620022300270".getBytes("UTF-8"), "CP1047")); I am getting below as output String: ä?????? But, what I want is: F0…
Arpit Aggarwal
  • 27,626
  • 16
  • 90
  • 108
1
2
3
13 14