|
There are a lot of existing programs that do not use commitment control to access the file. It is actually more simple than using QCMDEXC. The trigger buffer has a commit lock parameter. D TrgBuffer ds D TFileName 10 Bytes(1-10) D TLibraryName 10 (11-20) D TmemberName 10 (21-30) D TEvent 1 (31)1=Ins 2=Dlt3=Upd D TTime 1 (32)1=After 2=Before D TCommitLock 1 (33)1=Chg 2=CS 3=All User control the opening of the file and use the commit(value) keyword. FTESTH O E DISK USROPN COMMIT(COMMITLOCK) F RENAME(TESTH:TESTHR) F BLOCK(*NO) Set the commit value based on the trigger buffer. C IF TCOMMITLOCK <> '0' C IF %OPEN(TESTH) AND COMMITLOCK = *OFF C CLOSE TESTH C ENDIF C EVAL COMMITLOCK = *ON C ELSE C IF %OPEN(TESTH) AND COMMITLOCK = *ON C CLOSE TESTH C ENDIF C EVAL COMMITLOCK = *OFF C ENDIF The closing of TESTH is what I had to add to facilitate switching between the commitment levels. Regards, Mark > ----- Message from "Lim Hock-Chai" <Lim.Hock-Chai@xxxxxxxx> on Thu, > 30 Sep 2004 10:33:47 -0500 ----- > To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> > Subject: RE: Commitment control and open data paths with triggers > > I'm not understand why you want to condition the commitment control > for TESTH file in the trigger program. Wouldn't it be easier to > just always have it under commitment control. In the *inzsr, do > callp(e) to QCMDEXC to start the commitment control and then open the file.
As an Amazon Associate we earn from qualifying purchases.
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.