EBCDIC to ASCII conversion


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users EBCDIC to ASCII conversion
# 1  
Old 03-21-2019
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
# 2  
Old 03-21-2019
EBC[I]DIC?

If you mean the same as EBCDIC in your header take a look at the dd command:

man dd
# 3  
Old 03-21-2019
hi wisecracker ,

EBCIDIC file has packed decimals.Need to convert even Packed decimal values also to normal format.

Can you give me the full command which does the conversion from packed decimal to normal format

--- Post updated at 11:34 AM ---

Its EBCDIC format file
# 4  
Old 03-21-2019
Then as far as I know there is no simple solution.

Does the system you are using NOT have a "proprietary" conversion program to do the task?

If not then it is going to require a serious script of your own to do it.

It might require that you hexdump the file first to covert to ASCII base 16 format, (0x97 for example), and test for nibbles in each.
This is in its simplest form. Negation or sign extension will need to be taken into account and without seeing a small dump of the file there is little help I can give at this point.
# 5  
Old 03-21-2019
Write a cobol program.
Gnu-cobol is available at GnuCOBOL (formerly OpenCOBOL) download | SourceForge.net


If you don't know cobol, post the input file layout and i will write it for you.
This User Gave Thanks to jgt For This Post:
# 6  
Old 03-21-2019
Post in an adequate forum! Don't post technical questions in "Post Here to Contact Site Administrators and Moderators"

Moderator's Comments:
Mod Comment Moved the thread to "UNIX for Advanced & Expert Users" for you. Mayhap AIX would have been a better fit?
# 7  
Old 03-21-2019
Quote:
Originally Posted by swapna_1990
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
Maybe I'm missing something, but wouldn't iconv do the job?
or dd if=your-ebcdic-file conv=ascii
This User Gave Thanks to vgersh99 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

EBCDIC to ASCII conversion

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

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

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

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

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

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

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

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

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

10. 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
Login or Register to Ask a Question