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
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
  • 715
  • 2
  • 7
  • 25
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
  • 366
  • 1
  • 15
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
  • 16,632
  • 5
  • 55
  • 63
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
  • 854,327
  • 234
  • 1,573
  • 1,953
2
votes
0 answers

How to add a new encoding to vscode

does anyone know of a way to add a new encoding to VS Code? Either by way of adding a new encoding file or setting up an extension to do on the fly conversion? Specifically I'm trying to add support for decoding IBM EBCDIC (1047) to VS Code. Any…
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,980
  • 4
  • 22
  • 44
2
votes
4 answers

iconv to convert Mainframe EBCDIC file to Unix readable format writes data in one single row

I am trying to convert Mainframe file to Unix readable format using below iconv command. iconv -f IBM-037 -t ISO8859-1 FileA > FileB This command converts data as expected, but writes output data in one single row. Can someone help on how to handle…
NRC
  • 83
  • 1
  • 5
2
votes
1 answer

C/C++ character literals on ASCII and EBCDIC systems

After reading the PNG specification I was a little bit surprised. I've read character literals should be hardcoded with binary values like 0x41 not in (the programmer friendly) 'A'. The problem seems to be that character literals are differently…
Feyd
  • 38
  • 3
2
votes
2 answers

Import EBCDIC file to SQL Server

I have a file (10 gigs) in an export from a Mainframe database in EBCDIC format. I am trying to get this into a SQL Server 2008 database to query for a client. I am 100% clueless about conversion or import of this format. Repeated Google…
Brian Spencer
  • 194
  • 2
  • 7
2
votes
4 answers

How can I have Packed decimal and normal text in a single file?

I need to generate a fixed width file with few of the columns in packed decimal format and few of the columns in normal number format. I was able to generate. I zipped the file and passed it on to the mainframe team. They imported it and unzipped…
SJoe
  • 319
  • 2
  • 6
  • 14
2
votes
1 answer

Controlling automatic conversion from ASCII to EBCDIC via xlc fgets() in USS

I have an application on z/OS USS that happily reads EBCDIC (IBM-1047) and ASCII (ISO8859-1) files that are tagged with either encoding into char[] buffers. When started from a shell, the C runtime will automatically convert the file contents in…
2
votes
1 answer

How to customize ASCII to EBCDIC table in Notepad++'s TextFX plugin?

In Notepad++'s TextFX there is an embedded ASCII to EBCDIC table, but there is a reference to an custom table. What is the path for the table?
Stavr00
  • 3,219
  • 1
  • 16
  • 28
2
votes
2 answers

How to detect if a Unicode char is supported by EBCDIC in .NET 4.0?

We have a web site and WinForms application written in .NET 4.0 that allows users to enter any Unicode char (pretty standard). The problem is that a small amount of our data gets submitted to an old mainframe application. While we were testing a…
Scott Wylie
  • 4,725
  • 2
  • 36
  • 48
2
votes
2 answers

Python byte representation of a hex string that is EBCDIC

I have a string in hex: Hex = 'E388854083969497A4A38599408881A2409985829696A38584408699969440814082A48783888583924B' As a byte object it looks like…
Michael Nolan
  • 25
  • 1
  • 6
1 2
3
13 14