Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Converting COMP-3 into COMP-2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Converting COMP-3 into COMP-2
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    Post subject: Re: Converting COMP-3 into COMP-2
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7306

PostPosted: Sat Feb 18, 2012 12:36 am    Post subject: Reply to: Converting COMP-3 into COMP-2
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Sat Feb 18, 2012 12:40 am    Post subject: Reply to: Converting COMP-3 into COMP-2
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
This topic is locked: you cannot edit posts or make replies. DB2 query Using Recursion, Converting... smilewithashu2 DB2 3 Tue Jan 03, 2017 12:50 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us