Ebcdic to ascii


 
Thread Tools Search this Thread
Top Forums Programming Ebcdic to ascii
# 8  
Old 07-31-2014
Packed decimals, thank you, that's the term I was reaching for.

Well, is your input packed decimal? If you don't know, neither do we. Context is important, since the difference between -37 or a handful of illegible control characters is just which interpretation you take.
# 9  
Old 07-31-2014
The terms zoned, packed decimal, comp-2, and comp-3 are not EBCDIC; they are COBOL or PL/1 datatypes (like int, long, float, and double are C datatypes; which are not necessarily ASCII, or UTF-8, or EBCDIC).
# 10  
Old 08-01-2014
Hi Don

Can u pls let me know of any libraries in c++...to convert such cobol output in ebcdic to ascii....i have to convert on selective fields......

I am using g++ compiler on linux
# 11  
Old 08-01-2014
I don't know of any C++ libraries to convert COBOL datatypes to/from C++ datatypes.

As I said before, zoned decimal and packed decimal have nothing to do with ASCII or EBCDIC; they are binary formats.

I assume that you have already googled packed decimal and have read this Wikipedia page on Binary-coded decimal. It should give you all you need to convert packed decimal to a C++ integral type. (And, if you have the right hardware, there are assembly language instructions to do the vast majority of the work for you.)
# 12  
Old 08-01-2014
We need context. It'd be all too easy for us to write a function which uses different types from what you have. Show us some code from around where you need the translation code.
# 13  
Old 08-01-2014
Write a cobol program. Its the easiest way to do it. Besides packed decimal, there are also multiple types of signed fields, and binary fields.

GNU Cobol (formerly OpenCOBOL) | Free Development software downloads at SourceForge.net
# 14  
Old 08-03-2014
Quote:
Originally Posted by Don Cragun
I don't know of any C++ libraries to convert COBOL datatypes to/from C++ datatypes.

As I said before, zoned decimal and packed decimal have nothing to do with ASCII or EBCDIC; they are binary formats.

I assume that you have already googled packed decimal and have read this Wikipedia page on Binary-coded decimal. It should give you all you need to convert packed decimal to a C++ integral type. (And, if you have the right hardware, there are assembly language instructions to do the vast majority of the work for you.)
Hi Don,

a) Are there any libraries for cobol conversion to ANY other formats?
b) Similarly are there any libraries for ebcdic to ascii

We want to use libraries instead of implementing C++ code for which we do not have much expertise

Thanks & Regards,
Asif
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. 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

3. UNIX for Beginners Questions & Answers

Check if file is EBCDIC or ASCII format

So, i have this requirement where i need to check the file format, whether it's EBCDIC or ASCII, and based on format retrieve the information from that file: my file is: file1.txt-->this ebcdic file file2.txt-->ascii file i tried below code: file=file1.txt type="`file $file`" i get... (7 Replies)
Discussion started by: gnnsprapa
7 Replies

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

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

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. UNIX for Dummies Questions & Answers

Help! EBCDIC format to ASCII

Hi everyone, I have a 70MB EBCDIC file, with record length 102, block size 32742 and IBM standard label. I commanded dd if=input file of=outputfie ibs=32742 cbs=102 conv=ascii but I still don't get a viewable file under ASCII. Can anyone told me what's the problem? Do I need... (12 Replies)
Discussion started by: hrchl86
12 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