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?

"Solaris i-series Unix system" ?

Maybe O/P means IBM iSeries server range (some of which can run Solaris).

There is not enough information to guess what the problem is though.

I am working on one application, which basically take input file in EBCDIC file format, application parse the input file into ASCII file format. and hence output is readable to user.
I have two Solaris Unix setups, one is Solaris Sparc whereas other one is Solaris i386.
I am able to parse input file on Sparc Unix , however similar is not possible on i386 Unix server.
As I have executable file on Sparc Machine and hence i need to re execute code on i386 too. There is no compilation error on i386.

I am not sure about the issue, however I think, issue is with input file format ie EBCDIC. I Mean... EBCDIC file format which is generated on Sparc Solaris Unix Machine is not compatible with i386 Solaris Machine, and hence it gives me Memory Block reading issue on i386.
I need solution on same, what to do for this type of situation?
Thanks in Advance.

Have you tried converting the file using dd? Eg.

dd if=ebcdic.file of=ascii.file conv=ascii

yes, I used this command, unfortunately for client's input file, output is not in proper ASCII format. File is not readable.
However this command works fine for all input file which I created myself.
do you have any other way to generate from EBCDIC to ASCII file?
iconv command is not supported on Solaris machine.

Are you sure about this?

What precise version of Solaris are you running on each computer?

What software did you use which worked on the Sparc system?

They can't, Solaris isn't supported on Power5 CPUs.

Please find system info as below for Solaris Sparc
# uname -a
SunOS PDCSD19Z1 5.8 Generic_Virtual sun4u sparc SUNW,SPARC-Enterprise-T5120

# iconv
iconv: conversion from char unsupported
#

@jlliagre Thanks. Though it was announced in 2001 I can't trace a real Solaris implementation. Must have been vapourware.

Please find commands ran on Sparc Solaris System
# uname -a
SunOS PDCSD19Z1 5.8 Generic_Virtual sun4u sparc SUNW,SPARC-Enterprise-T5120

# iconv
iconv: conversion from char unsupported

Also, what exactly is your code doing?

You mention EBCDIC files being generated on SPARC Solaris, which simply wouldn't happen.

It seems more likely you're having problems with simply assuming the endianness of raw values. Are you writing data like binary int or long values directly into your files?

What computer creates the EBCDIC files? Is it an IBM mainframe?

How are the EBCDIC files transferred to the unix server?

What is the process on the Sparc server which works?

@methyl There was an official Solaris 2.5.1 release for PowerPC in 1996, but I doubt it was runnable on IBM AS400/iSeries hardware. 2.6 was supported internally but never released. No Solaris vaporware was announced in 2001.

@amodkavi What says

iconv -l

Can you post a sample of ebcdic data that doesn't convert properly ?
eg:

od -c file.ebcdic | head

@jlliagre Looks like salesman bullshit to cover our concerns about having multiple mismatched Operating Systems in an "integrated" system. We didn't buy them.