Re: COMP-1 and COMP-2 resolution on unix (using microfocus)
- From: kimi <mraghu83@xxxxxxxxx>
- Date: Fri, 22 Jun 2007 21:07:50 -0700
On Jun 22, 4:38 pm, "Michael Mattias" <mmatt...@xxxxxxxxxxxxxx> wrote:
"Louis Krupp" <lkr...@xxxxxxxxxxxxxxxxxxxxxxx> wrote in messageOKey.. Now say I am moving COMP-1 to DISPLAY field..
news:137naara153c81a@xxxxxxxxxxxxxxxxxxxxx
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).
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).
The COMP-1 data is say 21.234, it will be stored as 0.21234E+02.
Now if i move it to a display field with PIC S9(8)V999, In This case i
would get the right value..But,
If i decide to move it to say PIC S9(8)V99, In this case the value in
the DISPLAY field would'nt be in SYNC with the COMP-1 field.
So, can u pls tell me how would i know what is the PICTURE clause i
have to specify in the program for the display field...???
See my tutorial on the subject athttp://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)
--
Michael C. Mattias
Tal Systems Inc.
Racine WI
mmatt...@xxxxxxxxxxxxxxx Hide quoted text -
- Show quoted text -
.
- Follow-Ups:
- Re: COMP-1 and COMP-2 resolution on unix (using microfocus)
- From: Binyamin Dissen
- Re: COMP-1 and COMP-2 resolution on unix (using microfocus)
- From: HeyBub
- Re: COMP-1 and COMP-2 resolution on unix (using microfocus)
- From: Rick Smith
- Re: COMP-1 and COMP-2 resolution on unix (using microfocus)
- From: Pete Dashwood
- Re: COMP-1 and COMP-2 resolution on unix (using microfocus)
- 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: Program Termination (was COBOL record length on z/series)
- Next by Date: Re: Program Termination (was COBOL record length on z/series)
- 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
|
|