Hi, Pete --

I agree that the javadoc is confusing. But if you look at the javadoc for
AS400PackedDecimal it indicates that it "provides a converter between a
BigDecimal object and a packed decimal format floating point number." Also,
if you notice in the setUseDouble method javadoc, it starts out with Sets
"whether to return a Double object or a BigDecimal object on a call to
toObject()." The default as explained in the isUseDouble documentation is
BigDecimal (not BigInteger). You might want to submit a request to the
JTOpen people to enhance the class documentation just a bit but I'm afraid
that it's one of those things that once you know it, it's no big deal. But,
it doesn't make it easy for people new to the class. This is pretty much
the same for all of the classes that implement AS400DataType so once you
understand one of them, you mostly understand them all. But some are
documented more clearly than others.


-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Pete Hall
Sent: Thursday, November 05, 2009 7:07 PM
To: java400-l@xxxxxxxxxxxx
Subject: Re: Returning data with com.ibm.as400.access.ProgramCall

Hash: SHA1

Gary L Peskin wrote:
As for the value, you seem to be doing an awful lot of conversions.

myPackedVar = ((BigDecimal)

if (parms[5].getOutputDataLength() > 0)
myPackedVar = Integer.parseInt(

Fantastic Gary! That works just great. It's a lot to ask, but I could
really use a little instruction here. How would I know that I could cast
AS400PackedDecimal to BigInt? I don't see it in the javadoc class

- --
Pete Hall
Version: GnuPG v1.4.9 (GNU/Linux)

This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.