Re: COMP-1 and COMP-2 resolution on unix (using microfocus)
- From: Louis Krupp <lkrupp@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 22 Jun 2007 06:20:08 -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
Suppose for a moment that,on mainframe the format is IBM proprietary
format and on UNIX it is IEEE format.
In this case if i am trying to read COMP-1 or COMP-2 data [migrated
data which is converted to ASCII from EBCDIC on mainframe] then it
would read junk data because the above two formats interpret it
differently.
If i change the FLOAT directive at compile time to the format which is
same as that in mainframe , then would it work?? If so do you know any
command which would change the FLOAT format on UNIX.??
Also as i have mentioned i am using the microfocus compiler to compile
the programs on UNIX... Does microfocus provide such a command??
If you're converting the records from EBCDIC to ASCII (see Michael's post above), then you'd get garbage even if both systems used the same floating point format. In fact, I would expect that you'd get garbage in your COMP and COMP-3 fields as well.
As far as changing the floating point format in Microfocus COBOL, I wouldn't know. See Michael's post and then check your manual...
Louis
.
- References:
- Prev by Date: Re: COMP-1 and COMP-2 resolution on unix (using microfocus)
- Next by Date: Re: I need help!!
- 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
|