• Subject: Re: accessing db2/400 data and issues with Packed fields
  • From: Eric Merritt <cyberlync@xxxxxxxxx>
  • Date: Sat, 20 Jan 2001 11:48:43 -0800 (PST)

 There should be no problem accessing the data with
either JDBC or the RLA classes. Both of these methods
treat the Packed Numeric data as a java BigDecimal.
The calls look like this.

  JDBC---------------------------------------------
    BigDecimal someField =
rset.getBigDecimal(columnIndex);

  RLA----------------------------------------------
    
    BigDecimal someField = (BigDecimal)
record.getField("COLUMN_NAME");

I hope this helps. If you are going to be useing the
JDBC stuff check out what AS/400 datatypes map to what
JDBC field types in the Java Toolbox for AS400
programmers manual. It should help you out quite alot.







--- Jack Levin <jlevin@icubed.com> wrote:
> Hello,
> 
> I am an AS/400 newbie and am looking into accessing
> data on the as/400 from a remote application (Java
> app on an App server).  Not sure which development
> platform we are going to use.  Mabye VAJ or
> JBuilder.
> 
> Anyway, the data I will be accessing (db2/400 data)
> is of the packed type.  Do I need to be concerned
> about this? In other words, do I need to do any
> special programming for that or is there a way to be
> abstracted from it?
> 
> Also, I was thinking of using DB2 Connect so I could
> have JDBC access to the data.  If I use DB2 connect,
> will that abstract me from the packed data issue?
> 
> If there is a better way, please share.
> 
> Any advice is so appreciated.
> 
> Thanks.
> --
> Jack Levin, jlevin@icubed.com
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/
+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

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-2022 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.