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).

180 questions
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
3 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,584
  • 5
  • 19
  • 26
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
  • 685
  • 5
  • 10
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
  • 394
  • 1
  • 9
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
  • 5,364
  • 8
  • 37
  • 54
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
  • 5
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
  • 86,754
  • 39
  • 223
  • 453
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
  • 783
  • 1
  • 8
  • 20
3
votes
1 answer

Converting String from One Charset to Another

I am working on converting a string from one charset to another and read many example on it and finally found below code, which looks nice to me and as a newbie to Charset Encoding, I want to know, if it is the right way to do it . public static…
Arpit Aggarwal
  • 21,748
  • 13
  • 80
  • 99
3
votes
3 answers

Decoding COMP-3 packed fields in an ASCII file in Python?

I have a file that was formerly an EBCDIC-encoded file, which was converted to ASCII using dd. However, some lines contain COMP-3 packed fields which I would like to read. For example, the string representation of one of the lines I would like to…
user3873438
  • 125
  • 1
  • 5
3
votes
1 answer

String.getBytes(charset) has errors for EBCDIC-charset

The String-conversion to EBCDIC via String.getBytes(charset) supplys at least one false result. The character "a" becomes a 0x3f but should be 0x81. public static void convert() throws UnsupportedEncodingException { String data="abcABC"; …
Ulrich
  • 563
  • 2
  • 5
  • 21
3
votes
1 answer

EBCDIC code page does not convert lower case 'a'

I'm attempting to convert a string of characters from ASCII to EBCDIC using an IBM codepage. The conversion is correct except for lower case 'a' which is converted to an unprintable character. Here is a piece of a groovy script running in Windows 7…
mister270
  • 244
  • 1
  • 14
3
votes
2 answers

EBCDIC to ASCII conversion, handling numeric values

I’m attempting to convert files from ECDIC to ASCII format and have run into an interesting issue. The files contain fixed length records with some fields being signed binary integers (described as B4 in the record layout), and long-precision…
Garett
  • 15,936
  • 4
  • 53
  • 62
2
votes
3 answers

C code to convert EBCDIC printables to ASCII in-place

What is the simplest way in C to convert an EBCDIC-encoded string to its ASCII equivalent in-place. The only characters that need to be converted are the space, alphanumerics, and from the set <=>()+-*/&|!$#@.,;%_?". All other characters can simply…
paxdiablo
  • 772,407
  • 210
  • 1,477
  • 1,841
2
votes
3 answers

sshfs EBCDIC to ASCII

what I want to do is to be able to mount via sshfs some files on the mainframe via USS on my local PC. I can do that but sshfs doesnt do straight off the conversion from EBCDIC to ascii/unicode. Is there any flags that i can set. Alternativly, does…
Mark Lakewood
  • 1,830
  • 4
  • 21
  • 40
1
2
3
11 12