Re: COMP-1 and COMP-2 resolution on unix (using microfocus)
- From: Louis Krupp <lkrupp@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 22 Jun 2007 06:15:24 -0600
Michael Mattias wrote:
"Louis Krupp" <lkrupp@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:137naara153c81a@xxxxxxxxxxxxxxxxxxxxxkimi wrote:HI ppl,As far as I know, COMP-1 and COMP-2 are floating point. Your mainframe (IBM?) probably uses its own floating point format, and your Sun uses IEEE floating point. The bits are interpreted differently. It's an architecture difference and doesn't have much to do with the operating system.
i have migrated the data on mainframe to SOLARIS UNIX.
COMP-1 and COMP-2 is read as junk when the application is
run on this data.
But COMP and COMP-3 data are read fine.
I have Microfocus Server Express 4.0 SP2 installed in my
UNIX system.
I believe This issue has something to do with the way the
operaring system interprets it.
Is there a way in which i can read this COMP-1 and COMP-2
data successfully??
Depending on the range of your floating point data, you might be able to convert the file on the mainframe so it only uses COMP-3 (packed decimal), or you could try to find a program that will do the conversion on Solaris. You could also write such a program (but you probably wouldn't want to do it in COBOL).
COMP-3 doesn't help. This is an ASCII-EBCIDC character set issue, which is only going to be solved by putting all the data into USAGE IS DISPLAY format. (Or by handling ASCII-EBCDIC conversions on a field-by-field basis on either end of the file transfer).
See my tutorial on the subject at http://www.talsystems.com/tsihome_html/downloads/C2IEEE.htm
FWIW, both COMP-1 and COMP-2 are "implementor defined" data formats. With IBM mainframe COBOL, it's either IBM proprietary format or IEEE single (COMP-1) or IEEE double (COMP-2) depending on the setting of the FLOAT directive at compile time===> FLOAT ([HEX |NATIVE] | IEEE)
The ASCII-EBCDIC issue was the first thing that occurred to me, but since the OP says that COMP and COMP-3 work fine, that might not be the problem. (I'd be willing to guess that none of the data is DISPLAY and no EBCDIC->ASCII conversion is being performed.)
What I don't know -- and what you might -- is if there's a way to mix both floating point formats in one executable. If my guess about all this is right, that would give the OP a relatively simple solution.
Louis
.
- References:
- COMP-1 and COMP-2 resolution on unix (using microfocus)
- From: kimi
- Re: COMP-1 and COMP-2 resolution on unix (using microfocus)
- From: Louis Krupp
- Re: COMP-1 and COMP-2 resolution on unix (using microfocus)
- From: Michael Mattias
- COMP-1 and COMP-2 resolution on unix (using microfocus)
- Prev by Date: Re: COMP-1 and COMP-2 resolution on unix (using microfocus)
- Next by Date: Re: COMP-1 and COMP-2 resolution on unix (using microfocus)
- Previous by thread: Re: COMP-1 and COMP-2 resolution on unix (using microfocus)
- Next by thread: Re: COMP-1 and COMP-2 resolution on unix (using microfocus)
- Index(es):
Relevant Pages
|