Subsituting BFP for decimals may be standard, but it is usually a bad
idea (as are many "standard" programming practices) :-(
The standard java package java.math contains a BigDecimal class, which
is commonly used with JDBC drivers for Decimal columns.
IBM's JDK has an alternative version.
Unfortunately, you have to write your own code to convert a packed
decimal byte-array field into a java.math.BigDecimal,
but it's not too difficult.
Also, some versions of Websphere Studio Application Developer (aka
Rational Developer) have (somewhat lousy) support for
converting Cobol copy books into Java classes with field accessors for
Cobol data types.
Fortunately, there's not too much packed/zoned decimal data on
mainframes any more :-)
Kirk Wolf
dovetail.com
john gilmore wrote:
The standard device for giving Java access to packed-decimal data is
to convert these data into double-precision (eight-byte) BFP values.
This is always possible, and to the extent that Java is good at any
arithmetic, it is good at floating-point arithmetic, which it uses
very heavily indeed.
John Gilmore
Ashland, MA 01721-1817
USA
_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html