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



Ok, I'll try that next time I'm in front of the computer. Do I have to do
anything to maintain the journal? Does it just grow with every insert or
update?

On Fri, Oct 23, 2015, 13:18 Mike Jones <mike.jones.sysdev@xxxxxxxxx> wrote:

I've seen the -7008 error when the system wants a table to be journaled,
that is involved in an UPDATE or DELETE, with foreign keys present, and the
table is not journaled.

Try starting journaling on the two tables using the STRJRNPF command, and
then perform the UPDATE on the child table.

If I recall correctly, the system will issue -7008 even when the primary or
foreign key values are not changing. I think the journals are used to
ensure that orphan foreign keys are not created, and the mechanisms aren't
as sophisticated as one might anticipate.

Mike


message: 3
date: Fri, 23 Oct 2015 16:47:11 +0000
from: Justin Dearing <zippy1981@xxxxxxxxx>
subject: Foreign key causing Error:55019 Message:SQLSTATE=55019
SQLCODE=-7008

I would think a simple foreign key would be simple. Its not apparently.

tl;dr: If I add a foriegn key to a child table, I can insert into the
parent table, but not update it (I'm not updating the foreign key column)

The long version

I have two tables ABBAPF and ABBACPF. They don't have journals created
according to the output of the create table statement. In the later I
have
a foreign key setup like this:

AD_ID FOR COLUMN ABADROWID BIGINT NOT NULL
CONSTRAINT WEBLIB.FK_ABBACPF_ABBAPF REFERENCES WEBLIB.ABBAPF(ROWID),

I can insert into the parent table with no problem. However, this update
fails


UPDATE WEBLIB.ABBAPF SET XML_COL = XMLPARSE(DOCUMENT '<xmlRoot/>'),
ABMSGSTAMP = CURRENT TIMESTAMP, STATUS = 0, MESSAGE = 'Success' WHERE
ROWID
= 1 WITH NC

[SQL7008] ABBAPF in WEBLIB not valid for operation. [SQL State=55019, DB
Errorcode=-7008]

Note I tried adding the WITH NC after the fact. removing it doesn't help.

Dropping the child table makes the update work. therefore I'm pretty sure
its not journaling like this article says

http://www-01.ibm.com/support/docview.wss?uid=swg21380662


------------------------------

Subject: Digest Footer

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) digest
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



------------------------------

End of MIDRANGE-L Digest, Vol 14, Issue 1524
********************************************

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.