× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: JDBC and As/400 question
  • From: cujo@xxxxxxxxxx
  • Date: Fri, 20 Oct 2000 08:18:42 -0500
  • Importance: Normal


You do not need to use front padded 0s.  Simply put the value you desire
into the database.  The JDBC driver and database will cooperate to make
sure that the value has the right format.

Actually, depending on the release PTF level and stuff like that, you are
probably just wasting cycles putting in the leading spaces because the JDBC
drivers will end up taking them out before handing the value to the
database.

If you run into any specific problems that you can show me a couple line
example of (column format and specific value are all that are really
needed), e-mail them to me directly and I will take care of the issue.

Regards,

Richard D. Dettinger
AS/400 Java Data Access Team

"TRUE! nervous, very, very dreadfully nervous I had been and am; but why
WILL you say that I am mad?
The disease had sharpened my senses, not destroyed, not dulled them. "

- Edgar Allan Poe
"The Tell-Tale Heart"




"Yiannis Stamatopoulos" <jstamatop@hotmail.com>@midrange.com on 10/20/2000
05:54:43 AM

Please respond to JAVA400-L@midrange.com

Sent by:  owner-java400-l@midrange.com


To:   <JAVA400-L@midrange.com>
cc:
Subject:  JDBC and As/400 question




Hello everyone,
I have a possibly silly question, since I am totally unused to  the AS/400
system. I want to connect to AS/400 files (this is a little obscure  to me,
I think AS/400 files equal to DB2 tables or not???) using JDBC from a  Java
program. The thing is that numeric is used for many fields in the files,
and all of the fields are padded with zeros if the number has less digits
than  the field's declaration. For example for a numeric(9) field a correct
entry  would be 000056787. How is this possible to be kept consistent using
JDBC calls?  Could I insert rows using only strings which would be padded
with zeros from my  Java program or is there any other workaround? Thanks
for your time, and I'm  really sorry if the question is trivial.

Yiannis Stamatopoulos




+---
| 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-2024 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.