By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,225 Members | 2,170 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,225 IT Pros & Developers. It's quick & easy.

Cannot delete table data with db2 connect

P: n/a
I have a database which I have loaded onto our as/400 v4r5. All the
tables and data have loaded successfully. I am using DB2 connect to
access. I now want to delete the data in a table which is where the
problem is starting.
I type delete from tablename in the command centre and get the
following message

SQL7008N REXX variable "*N" contains inconsistent data.

Explanation:

A variable that contained inconsistent data was passed to REXX.

The command cannot be processed.

User Response:

If the variable is an SQLDA, verify that the data and length
fields have been assigned correctly. If it is a REXX variable,
verify that the type of data is appropriate to the command where
it is being used.
I have also tried from the command line processor and get exactly the
same error. Apparantly I have all the necessary authority to delete
data.

If anyone could give some help or advice on what to do, it would be
much appreciated.

Many Thanks,
Trevor Davies.
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Trevor Davies wrote:
I have a database which I have loaded onto our as/400 v4r5. All the
tables and data have loaded successfully. I am using DB2 connect to
access. I now want to delete the data in a table which is where the
problem is starting.
I type delete from tablename in the command centre and get the
following message

SQL7008N REXX variable "*N" contains inconsistent data.
<snip>
I have also tried from the command line processor and get exactly the
same error. Apparantly I have all the necessary authority to delete
data.

If anyone could give some help or advice on what to do, it would be
much appreciated.


If SQL7008 is returned from the AS/400 server, often it is because the
DML operation is being performed under commitment control, while the
target table is not journaled. Journaling is required for commitment
control. See reason code 3 in the message snippet below. You will need
to either start journaling the table, or run w/o commitment control.

(This is a common problem - try Google with search terms of "SQL7008"
and "AS/400" .. you will likely get numerous hits.)

===> DSPMSGD RANGE(SQL7008) MSGF(QSQLMSG)

Message ID . . . . . . . . . : SQL7008

Message file . . . . . . . . : QSQLMSG

Library . . . . . . . . . : QSYS

Message . . . . : &1 in &2 not valid for operation.

Cause . . . . . : The reason code is &3. Reason codes are:

1 -- &1 has no members.

2 -- &1 has been saved with storage free.

3 -- &1 not journaled, or no authority to the journal. Files with
an RI constraint action of CASCADE, SET NULL, or SET DEFAULT must be
journaled to the same journal.

4 and 5 -- &1 is in or being created into production library but
the user has debug mode UPDPROD(*NO).
--
Karl Hanson
Nov 12 '05 #2

P: n/a
Trevor Davies wrote:
I have a database which I have loaded onto our as/400 v4r5. All the
tables and data have loaded successfully. I am using DB2 connect to
access. I now want to delete the data in a table which is where the
problem is starting.
I type delete from tablename in the command centre and get the
following message

SQL7008N REXX variable "*N" contains inconsistent data.
<snip>
I have also tried from the command line processor and get exactly the
same error. Apparantly I have all the necessary authority to delete
data.

If anyone could give some help or advice on what to do, it would be
much appreciated.


If SQL7008 is returned from the AS/400 server, often it is because the
DML operation is being performed under commitment control, while the
target table is not journaled. Journaling is required for commitment
control. See reason code 3 in the message snippet below. You will need
to either start journaling the table, or run w/o commitment control.

(This is a common problem - try Google with search terms of "SQL7008"
and "AS/400" .. you will likely get numerous hits.)

===> DSPMSGD RANGE(SQL7008) MSGF(QSQLMSG)

Message ID . . . . . . . . . : SQL7008

Message file . . . . . . . . : QSQLMSG

Library . . . . . . . . . : QSYS

Message . . . . : &1 in &2 not valid for operation.

Cause . . . . . : The reason code is &3. Reason codes are:

1 -- &1 has no members.

2 -- &1 has been saved with storage free.

3 -- &1 not journaled, or no authority to the journal. Files with
an RI constraint action of CASCADE, SET NULL, or SET DEFAULT must be
journaled to the same journal.

4 and 5 -- &1 is in or being created into production library but
the user has debug mode UPDPROD(*NO).
--
Karl Hanson
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.