|
I've actually found a use for turning on commitment control in my
SQLRPGLE program. So I did that easy enough with:
exec sql set option COMMIT=*CHG;
Then I tried to build the workfile that will be the source for a
number of updates and inserts. It failed with SQL7008, which
basically says I can't run commitment control on a file that's not
journaled.
Thing is, this is QTEMP, so it will never be journaled.
I used both a "create table as" and tried building the table and
then using "insert". Both gave me the same failure.
Do I have to turn off commitment control to work with QTEMP? If so,
how do I do that? I'd like it on for when my program updates the
production files its designed to work with.
Snippet:
exec sql create table QTEMP/PARTLIST as
(select *
from FRTL01 FRT
where exists
(select * from FRT b
where RWRKC in (31380,31385)
and RPROD=FRT.RPROD and RTWHS=FRT.RTWHS)
) with data;
if SQLCOD<>0;
return;
endif;
exec sql update FRTL01 FRT
set ROPNO=ROPNO*10
where exists
(select * from QTEMP/PARTLIST PL
where RPROD=FRT.RPROD and RTWHS=FRT.RTWHS)
;
if SQLCOD<>0;
exec sql rollback;
return;
endif;
exec sql Commit;
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.