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




In the following code, the first update is performed OK, the second errors
out.
Any ideas? Thanks.

try {
  if (pstmt == null)
  pstmt = conn.prepareStatement("UPDATE BRUCELIB.LIBLIST SET ODOBTX=? WHERE
ODOBNM=?");

  pstmt.setString(1,"NEW VALUE");
  pstmt.setString(2,"ALLYF");
  pstmt.executeUpdate();                          // updated OK

  pstmt.setString(2,"ALLYO");                  // try to set another row to
“NEW VALUE”
  pstmt.executeUpdate();                         // get SQL7008 error

  pstmt.close();
}

We get error during execution:

“Query failed with:'[SQL7008] LIBLIST in BRUCELIB not valid for operation.”

There is no reason code for this SQL7008. Using DSPMSGD, we see SQL7008 is
as follows:

 Message ID . . . . . . . . . :   SQL7008
Message file . . . . . . . . :   QSQLMSG
  Library  . . . . . . . . . :     QSYS

Message . . . . :   &1 in &2 not valid for operation.
Cause . . . . . :   The reason code is &3:
    -- Code 1 -- &1 has no members.
    -- Code 2 -- &1 has been saved with storage free.
    -- Code 3 -- &1 is not journaled, or you do not have authority to the
  journal.  Files with an RI constraint action of CASCADE, SET NULL, or SET
  DEFAULT must be journaled to the same journal.
    -- Code 4 and 5 -- &1 is in or is being created into a production
library
  but the user is in debug mode with UPDPROD(*NO).
    -- Code 6 -- a collection is being created, but the user is in debug
mode
  with UPDPROD(*NO).
    -- Code 7 -- a based-on table used in the creation of the view is not
  valid because it is a program described table or is in a temporary
library.
 -- Code 8 -- a user attempted to create an object but the based-on table
  resides in an Auxiliary Storage Pool (ASP) which is different than the ASP
  where the object is being created.
    -- Code 9 -- the index is currently held or is not valid.
    -- Code 10 -- a constraint is being added but the table is not valid.
The
  table either has a maximum member value greater than one, is a source
file,
  is in QTEMP, is not in the same ASP as the parent or dependent table, is
not
  write, update, or delete capable, is not an externally described file, or
  has a parent table that does not have a member.
    -- Code 11 -- a distributed table is being created in library QTEMP, or
a
  view is being created over greater than one distributed table.
    -- Code 12 -- a table could not be created in QTEMP, QSYS or QSYS2
because
  it contains a column of type datalink having the FILE LINK CONTROL option.
 Recovery  . . . :   A list of corrective actions follow:
     -- If code 1, add a member to &1 (ADDPFM command).
     -- If code 2, restore &1 (RSTOBJ command).
     -- If code 3, start journaling on &1 (STRJRNPF command), or get access
to
   the journal.
     -- If this is reason code 4, 5, or 6, perform a CHGDBG command with
   UPDPROD(*YES).
     -- If code 7, remove table names which identify files in QTEMP or to
   program described files.
     -- If code 8, use tables in the same ASP.
     -- If code 9, use the edit rebuild of access path (EDTRBDAP) command
and
   change the sequence of the access path from HELD to 1-99 or *OPN, or
rebuild
   or delete the unique index or constraint.

 …….


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