what cobol datatype represents ieee standard ?

Hi,

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.

Thanks
Chris
chkorteAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JesterTooCommented:
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.

   http://www.discinterchange.com/TechTalk_COBOL_comp_.html
   http://www.tek-tips.com/faqs.cfm?fid=5154
   http://www.codecomments.com/Cobol/message387915.html
   http://www.codecomments.com/archive266-2004-5-192923.html

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

HTH,
Lynn
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
COBOLdinosaurCommented:
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.

Cd&
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.