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



Amy,
   Just a guess...
   The javadoc on open() states "If ... the file is
opened for READ_ONLY, the record cache will be filled
with an initial set of records."   Perhaps when you
switch to READ_WRITE, open()does not fill the record
cache.  That might explain why the two cases are
acting differently, but it still seems to me that
read() under READ_WRITE should work.

Don Whittaker

--- AAnuszewski@hammer.net wrote:
>
>
>
>
>
>
>
> OK.  Sorry for the vagueness.  Here's the problem.
>
> This code correctly prints out the value for VEOE if
> I open it as READ_ONLY.  If
> I run the same routine but open the file as
> READ_WRITE, no record is found.  No
> exceptions occur, but the routine never enters the
> if (record != null) clause.
>
>
> VendFile.open(AS400File.READ_ONLY, 0,
> AS400File.COMMIT_LOCK_LEVEL_NONE);
>                    Object[] keyObj = new
> Object[]{new String(transVendorNumber2
>                               Record record =
>
VendFile.read(keyObj,com.ibm.as400.access.KeyedFile.KEY_LE);
>           if (record != null) {
>                // The vendor exists.  Get the VEOE
> for the Vendor and increment
> it.
>                BigDecimal openEncumber =
> (BigDecimal)record.getField("VEOE");
>
> The permissions on the file are set so that my group
> as *all, and public has
> *change.
>
> Amy
>
>
>
>
>
>
> |--------+---------------------------->
> |        |          "Joe Pluta"       |
> |        |          <joepluta@PlutaBro|
> |        |          thers.com>        |
> |        |                            |
> |        |          12/08/2001 10:14  |
> |        |          AM                |
> |        |          Please respond to |
> |        |          java400-l         |
> |        |                            |
> |--------+---------------------------->
>
>
>-------------------------------------------------------|
>   |
>      |
>   |      To:     java400-l@midrange.com
>      |
>   |      cc:     (bcc: Amy K Anuszewski/WSC)
>      |
>   |      Subject:     RE: I know this must be a
> stupid    |
>   |       question - updating a record
>      |
>
>
>-------------------------------------------------------|
>
>
>
>
> I know you're frustrated, Amy, but hang in there and
> hopefully we can help
> you <grin>.  "Nothing is printing out" is a little
> vague, so why don't you
> show us some example code and let us take a look.  I
> know that I've read and
> updated data using the RLA classes.
>
> Joe
>
>
>
>
>
> _______________________________________________
> This is the Java Programming on and around the
> iSeries / AS400 (JAVA400-L) mailing list
> To post a message email: JAVA400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit:
> http://lists.midrange.com/cgi-bin/listinfo/java400-l
> or email: JAVA400-L-request@midrange.com
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/java400-l.
>


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.