IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Converting COMP-3 into COMP-2


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Rjadeja

New User


Joined: 18 Feb 2008
Posts: 9
Location: Mumbai

PostPosted: Fri Feb 17, 2012 9:56 pm
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Feb 17, 2012 10:22 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Feb 18, 2012 12:36 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sat Feb 18, 2012 12:40 am
Reply with quote

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 icon_cool.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Converting fixed length file to excel... IBM Tools 7
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
No new posts Converting S9(18) value to a decimal ... DFSORT/ICETOOL 6
Search our Forums:

Back to Top