Re: COMP-1 and COMP-2 resolution on unix (using microfocus)



kimi wrote:
On Jun 22, 3:49 pm, Louis Krupp <lkr...@xxxxxxxxxxxxxxxxxxxxxxx>
wrote:
kimi wrote:
HI ppl,
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??
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.

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
.



Relevant Pages

  • Re: Java compatibility issues (WAS: MF having issues?)
    ... sure what you mean by Hex floating point. ... Originally IBM mainframe hardware had its own floating-point format and it ...
    (comp.lang.cobol)
  • Re: Java compatibility issues (WAS: MF having issues?)
    ... sure what you mean by Hex floating point. ... Originally IBM mainframe hardware had its own floating-point format and it ...
    (comp.lang.cobol)
  • Re: Sorts (revised)
    ... >do all that with a mainframe and keep the costs really low. ... Unix because I found it 'cryptic'. ... The only difference is cost .. ... I worked on Major Big Time databases containing billions of rows. ...
    (comp.lang.cobol)
  • Re: How many other editors in use
    ... heard that IBM had actually *done* it. ... it seemed to be a fairly complete UNIX ... There are an assortment of mainframe programs that advertise things like ... no matter how many manuals I accumulated. ...
    (comp.editors)
  • Re: Power5 and Cell, new issue of IBM Journal of R&D
    ... a little hypervisor topic drift from a thread in a.f.c ... ... i've previously posted on the erep/ras issue for mainframe unix ports ...
    (comp.arch)