Sponsored Content
Full Discussion: EBCDIC to ASCII conversion
Top Forums UNIX for Advanced & Expert Users EBCDIC to ASCII conversion Post 303032727 by bakunin on Friday 22nd of March 2019 03:03:46 PM
Old 03-22-2019
FYI "packed format" is not part of the EBCDIC character set, it is a way of storing numerical data on the host. Basically the host has two forms of storing numerical data: "zoned (decimal)" and "packed (decimal)". Here is a thorough description.

Basically "zoned" stores a hexadecimal value in the lower nibble (the lower 4 bits of a byte) and an "F" in the higher nibble. In the last digit the higher nibble is used for storing the sign instead. i.e "123" (or "+123") would look like F1F1C3, the "C" being the code for a positive number. This format can be translated easily into ASCII (simply replace the high-nibbles with "3" instead of "F").

The packed format stores a digit in each of the nibbles so that there is no direct translation of one byte EBCDIC to one byte ASCII. The sign is stored in in the last nibble but coded in various ways (depending on "format" versus "informat". Either "C" is positive and "D" is negative (format) or "A", "C", "E" and "F" is positive and "B" and "D" is negative (informat). If you end with an odd number of nibbles the leftmost byte is padded with a 0 (zero) in the high-nibble. You actually need to calculate the value from the bytewise representation to translate it to ASCII.

There are professional software packages for the file transfer between (z/OS) mainframes and the UNIX world. Connect: Direct, IND$FILE and XCOM Data Transfer, just to name a few. The problem with transferring mainframe data is that there are a lot more data formats on the mainframe than there are on UNIX. You have i.e. fixed-length-record data, you have packed and zoned decimals and lots more. It isn't (only) that easy 1:1 translation you have from one charset to another.

I hope this helps.

bakunin
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ascii to ebcdic conversion

Hello, I need a program for ascii to ebsdic conversion. If anybody can help, it'll be greatly appreciated. Thanks. (1 Reply)
Discussion started by: er_ashu
1 Replies

2. UNIX for Dummies Questions & Answers

Conversion from EBCDIC to ASCII

when i try to convert a mainframe EBCDIC file to ASCII ,i dont see correct file this is the source file ... (3 Replies)
Discussion started by: venkatvelpula
3 Replies

3. Solaris

EBCDIC to ASCII Binary conversion issue on Solaris i-series Unix

Hi All, I am facing EBCDIC to ASCII Binary conversion on Solaris i-series Unix system. However this is working fine on Solaris Sparc Unix system. Input file having EBCDIC format does not work on Solaris i-series Unix system. Could you please tell me, what will be the root cause for same? (14 Replies)
Discussion started by: amodkavi
14 Replies

4. Shell Programming and Scripting

EBCDIC Format to ASCII

Hi, we have source file with EBCDIC format(Main Frame files) where we receving from source system. I would like to convert the EBCDIC format file to unix systemformat(ex: .csv,txt ) I have wrote script like: dd if=<SRCPATH>yyy.xxx.RB065 of=<SRCPATH>/output.csv ibs=800 cbs=80... (8 Replies)
Discussion started by: koti_rama
8 Replies

5. UNIX for Advanced & Expert Users

Conversion of data - ebcdic to ascii

Hi, I want to convert ebcdic values to ascii values. Are there anyany specific c++ libraries with g++ compiler, which can do it ? gcc version 4.1.2 20080704 (Red Hat 4.1.2-54) (0 Replies)
Discussion started by: tostay2003
0 Replies

6. Programming

Ebcdic to ascii

Hi, I want to convert ebcdic values to ascii values. Are there anyany specific c++ libraries with g++ compiler, which can do it ? gcc version 4.1.2 20080704 (Red Hat 4.1.2-54) (19 Replies)
Discussion started by: tostay2003
19 Replies

7. UNIX for Dummies Questions & Answers

EBCDIC TO ASCII Conversion through UNIX Command

Hi All , I have a mainframe file which contains the data in EBCDIC unreadable format.I have downloaded this raw unreadable file from mainframe system to windows in text format then I pushed to Unix system.Now I want to convert this file to ASCII readable format file in unix.Can anyone advise me... (2 Replies)
Discussion started by: STCET22
2 Replies

8. UNIX for Advanced & Expert Users

Conversion from EBCDIC to Ascii OR unicode

I have a file in my Unix ( SOLARIS ) with EBCDIC format...I want this file to read in ASCII OR unicode...Is it possible with UNIX to convert this file on ASCII OR UNICODE format from EBCDIC format? I was searching through web and found only conversion table :( Request Rejected Below is... (16 Replies)
Discussion started by: joshilalit2004
16 Replies

9. Shell Programming and Scripting

Need help for EBCDIC TO ASCII conversion through UNIX

Hi All , We have a mainframe file which is in EBCDIC format.We dont have direct access to mainframe ,client has provided us the mainframe file in unix box.The mainframe file is containing pact data(COMP1 ,COMP2 etc) which are unreadble.Can anyone suggest me how to convert this kind of ebcdic... (7 Replies)
Discussion started by: STCET22
7 Replies

10. UNIX for Advanced & Expert Users

EBCDIC to ASCII conversion

Hi, I have a input file which is EBCIDIC and it has packed decimals. Can anyone help me to convert EBCIDIC file to ASCII(Need to convert even Packed decimal values also to normal format). Thanks swapna (12 Replies)
Discussion started by: swapna_1990
12 Replies
All times are GMT -4. The time now is 04:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy