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




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

Follow-Ups:

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.