what cobol datatype represents ieee standard ?

Posted on 2005-03-01
Medium Priority
Last Modified: 2012-05-05

I wonder which cobol datatype similar to comp-2 can be used to represent the ieee standard.

The task is to call a c programm that uses this standard and build an interface to it on an mvs machine running on zos.

Question by:chkorte
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 22

Accepted Solution

JesterToo earned 500 total points
ID: 13431966
Well, I've written a couple million lines of COBOL in my time but it's been about 15 years ;-).  IBM mainframe COBOL compilers (from IBM) don't support the IEEE standard for floating-point representation of numbers... they have their own proprietary format because it matches their hardware design better (more efficient).  I believe their is a proposal to include the standard in the next ANSI COBOL standard.  But, that doesn't necessarily mean IBM will adopt it in their compiler any time soon, though.

If all your code/data resides on MVS you should be able to convert the format of the data being passed as parameters by using a middle-man function written either in C or ALC (or perhaps even in FORTRAN... it may have native support for IEEE now).  If you need to pass the data between platforms you will need to write a translation function on one platform or the other.

The actual implementation of most of the "comp" datatypes is vendor and platform specific.

Here are some links providing more information about the issue with some advice for dealing with it.


Even more web references can be found by googling for:   cobol ieee binary

LVL 53

Expert Comment

ID: 13434998
depending on the number of significant digits you probaly want to convert to a numeric represntation as a string in C then bring it into a pic x(?) field where you can dow what ever is necessry to get the right number value.

Or if it is small enough convert to long and and bring it into COBOL as COMP-3.


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Make the most of your online learning experience.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question