View previous topic :: View next topic
|
Author |
Message |
Rjadeja
New User
Joined: 18 Feb 2008 Posts: 9 Location: Mumbai
|
|
|
|
Hi All,
Can you please help in converting COMP-3 into COMP-2 in COBOL.
I have one input file which has one varaible which is Comp-3 where as table field corresponding to it is Comp-2. So I want to use for match or fetch record from database.
Thanks,
Raghu |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Rjadeja wrote: |
Hi All,
Can you please help in converting COMP-3 into COMP-2 in COBOL.
I have one input file which has one varaible which is Comp-3 where as table field corresponding to it is Comp-2. So I want to use for match or fetch record from database.
Thanks,
Raghu |
RTFM -- consider move or compute. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Why has the table got comp-2 anyway?
If you follow Craq's fine suggestion you'll find you don't have a problem with the code.
Just why comp-2? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
I wonder about application design ...
Quote: |
COMPUTATIONAL-2 or COMP-2
Specified for internal floating-point items (double precision).
COMP-2 items are 8 bytes long. The sign is contained in the first bit
of the leftmost byte and the remaining 7 bits contain the exponent.
The remaining 7 bytes contain the mantissa.
|
and talk about portability... IEEE floating point VS. IBM floating point |
|
Back to top |
|
|
|