Re: COMP-1 and COMP-2 resolution on unix (using microfocus)
- From: Louis Krupp <lkrupp@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 22 Jun 2007 06:09:53 -0600
kimi wrote:
On Jun 22, 3:49 pm, Louis Krupp <lkr...@xxxxxxxxxxxxxxxxxxxxxxx>
wrote:
kimi wrote:HI ppl,As far as I know, COMP-1 and COMP-2 are floating point. Your mainframe
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??
(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.
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).
Louis
As you suggested i am looking for a solution in which i can convert
all the COMP-1 variables to COMP-3 on mainframe itself.
But there seems to be a problem with just directly moving the COMP-1
variable to say S9(08)V99 COMP-3. But i would be wrong in specifying
S9(08)V99 because i do not know the place of decimal point.
Therefore merely moving the COMP-1 data to COMP-3 with a move
statement would be wrong.
Can you pls suggest me methods to the conversion or if u have a COBOL
program to do that it would be great!!!!
As far as I know, moving a COMP-1 to a COMP-3 would be safe as long as the original value was within the range of the COMP-3 picture (less than ten to the eighth in the case of pic s9(8)v99). You also have to worry about losing too many fractional decimal places; a value that approximates 0.1234 would be truncated to 0.12, and that might be a problem.
If the range is a problem, you might want to do something like this: add a field to store the integer part of the common logarithm of the COMP-1 value, normalize that value to something on the order of 1 (with lots of places after the decimal point), store the normalized value as COMP-3, and put it all back together on Solaris. I'm sure someone here has done all this and can add details if you need them.
Louis
.
- References:
- 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
|
|