HP3000-L Archives

April 2002, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Michael Berkowitz <[log in to unmask]>
Reply To:
Michael Berkowitz <[log in to unmask]>
Date:
Tue, 9 Apr 2002 09:49:18 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (37 lines)
Michael Anderson writes


On MPE/iX 6.5, pp7 I have a very old (1970's) Fortran 66 application,
running in CM. It makes use of image data items in the R4 format. I now have
need to access these data items using a NM COBOL Application. I looked at
'INT' and 'DINT' (from the compiler library) to try to convert these R4 data
items into something that COBOL could deal with, but it seems that 'INT' and
'DINT' are callable by SPL, of Fortram ONLY.

Does any on the list know of a routine (Supported/Unsupported) that will
convert R4 data items into an integer, including the decimal place value.

My cobol program reads the R4 data item as PIC x(8). So I'd like to have
something like:

 01 realvalue pic x(8)
 01 integervalue pic s9(9) comp.
 01 decimalplace pic s9(4) comp.

      CALL "R4CVT" USING REALVALUE INTEGERVALUE
                         DECIMALPLACE.

 Anyone know where a could find something like this?
Or close to it?
-----------------------------------------------------
In Cobol, or any other language, to convert a real to a string, or the vice
versa, use the HPINEXT intrinsic.  After you get the string you will have
two parts of the real separated by a "."(period).  The left side is the
number and the right is exponent.

Mike Berkowitz
Guess? Inc.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2