Some thoughts and musings. Comments from the peanut gallery would be welcome.

One thought I had was to expose and wrap the remaining ResultSet.getxxxx methods that weren't already exposed in JDBCR4.

Then I noticed the ResultSet.getBytes() method: running an actual Java program calling JDBC on DB2/400, I get the correct raw bytes for both zoned and packed (and the raw bytes for character fields even come up as EBCDIC.

Then I realized that the method wouldn't necessarily produce anything directly usable for databases other than DB2/400. And to that end, I replicated our familiar VIEWCUS PF in MySQL. Damn: for both "Numeric" and "Decimal" fields, getBytes on a MySQL database yields ASCII digits, with leading zeros truncated off, and actual ASCII minus signs and/or decimal points among the digits.

Interesting: getObject() on a Numeric field that doesn't have any decimal places yields an Integer, but on a Decimal field with no decimal places, it yields a BigDecimal.

Given that I haven't a clue how to deal with a BigDecimal in ILE or OPM RPG, much less in OPM MI, I'm thinking that the simplest solution for the problem at hand is to get everything as a string, and convert it into whatever form it SHOULD be in.

But it also looks like JDBCR4, so far, has not exposed any of the methods for updating through a result set.

--
JHHL

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.