|
Rob, It doesn't work for me. ADDLIBLE cwlibr *FIRST STRSQL CREATE TABLE CWLIBR/TESTTBL (NAME CHAR (10 ) NOT NULL WITH DEFAULT, FLD2 CHAR (20 ) NOT NULL WITH DEFAULT) CREATE TABLE CWLIBR/TESTTBL2 (FIELD1 CHAR (10 ) NOT NULL WITH DEFAULT, FIELD2 CHAR (20 ) NOT NULL WITH DEFAULT) create trigger cwlibr/testtbl_testtrigger after insert on cwlibr/testtbl referencing new as N for each row mode DB2ROW begin insert into testtbl2 (field1) values(n.name); end INSERT INTO CWLIBR/TESTTBL VALUES('Test', 'dummy') CRTLIB CMWTEMP CRTDUPOBJ OBJ(TESTTBL) FROMLIB(*LIBL) OBJTYPE(*FILE) TOLIB(CMWTEMP) Leaves me with an inoperative trigger on TESTTBL in CMWTEMP. I can even CRTDUPOBJ OBJ(TESTTBL2) FROMLIB(*LIBL) OBJTYPE(*FILE) TOLIB(CMWTEMP) CRTDUPOBJ OBJ(TESTTBL) FROMLIB(*LIBL) OBJTYPE(*FILE) TOLIB(CMWTEMP) So that TESTTBL2 is in the new library before hand and the trigger on TESTTBL is still *INOPERATIVE. This is v5r3, PTF groups SF99530 5102 SF99529 52 SF99503 5 Charles Wilt -- iSeries Systems Administrator / Developer Mitsubishi Electric Automotive America ph: 513-573-4343 fax: 513-398-1121 > -----Original Message----- > From: midrange-l-bounces@xxxxxxxxxxxx > [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx > Sent: Thursday, December 15, 2005 3:54 PM > To: Midrange Systems Technical Discussion > Subject: RE: CRTDUPOBJ of file with trigger renders trigger > inoperative > > Just duplicated it on another machine, CRTDUPOBJ left the trigger > operative. V5R3. > And when I opened ROBX with iSeries Navigator, Databases, > Schemas, ROBX, > Triggers, that shows it as Enabled and operative. > > Cool factor: In this area you can sort triggers by the > column Operative. > Maybe that's a tool you should look at? > > I do not see any easy click way to change Operative. There > is an easy > click way to change Enable/Disable. > > Rob Berendt > -- > Group Dekko Services, LLC > Dept 01.073 > PO Box 2000 > Dock 108 > 6928N 400E > Kendallville, IN 46755 > http://www.dekko.com > > > > > > "DeLong, Eric" <EDeLong@xxxxxxxxxxxxxxx> > Sent by: midrange-l-bounces@xxxxxxxxxxxx > 12/15/2005 03:12 PM > Please respond to > Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> > > > To > "'Midrange Systems Technical Discussion'" <midrange-l@xxxxxxxxxxxx> > cc > > Fax to > > Subject > RE: CRTDUPOBJ of file with trigger renders trigger inoperative > > > > > > > But you did a save/restore to move the objects. CRTDUPOBJ > seems to be the > culprit.... > > Eric DeLong > Sally Beauty Company > MIS-Project Manager (BSG) > 940-297-2863 or ext. 1863 > > > > -----Original Message----- > From: midrange-l-bounces@xxxxxxxxxxxx > [mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of rob@xxxxxxxxx > Sent: Thursday, December 15, 2005 1:22 PM > To: Midrange Systems Technical Discussion > Subject: RE: CRTDUPOBJ of file with trigger renders trigger > inoperative > > > I did this: > > STRSQL > > CREATE TABLE COMPANY_STATS > (NBEMP INTEGER, > NBPRODUCT INTEGER, > REVENUE DECIMAL(15,0)) > > INSERT INTO ROB/COMPANY_STATS (NBEMP) VALUES(1) > > CREATE TABLE ROB/EMPLOYEE (EMPNBR INT NOT NULL WITH DEFAULT) > > CREATE TRIGGER NEW_HIRE > AFTER INSERT ON EMPLOYEE > FOR EACH ROW MODE DB2SQL > UPDATE COMPANY_STATS SET NBEMP = NBEMP + 1 > > INSERT INTO ROB/EMPLOYEE (EMPNBR) VALUES(5) > > SELECT * FROM COMPANY_STATS > ....+....1....+....2....+....3....+....4....+....5.. > NBEMP NBPRODUCT REVENUE > 2 - - > ******** End of data ******** > > CREATE COLLECTION ROBX > > > F3 > > SAVOBJ OBJ(COMPA00001 EMPLOYEE) LIB(ROB) DEV(*SAVF) SAVF(ROB/ROB) > > RSTOBJ *ALL ROB DEV(*SAVF) SAVF(ROB/ROB) RSTLIB(ROBX) > > DSPFD ROBX/EMPLOYEE > > .+....1....+....2....+....3....+....4....+....5....+....6....+....7 > Trigger name . . . . . . . . . . . . . . . : TRG NEW_HIRE > Trigger library . . . . . . . . . . . . . : ROBX > Trigger state . . . . . . . . . . . . . . : STATE *ENABLED > Trigger status . . . . . . . . . . . . . : *OPERATIVE > > > STRSQL > > INSERT INTO ROBX/EMPLOYEE (EMPNBR) VALUES(7) > > SELECT * FROM ROBX/COMPANY_STATS > ....+....1....+....2....+....3....+....4....+....5.. > NBEMP NBPRODUCT REVENUE > 2 - - > ******** End of data ******** > > SELECT * FROM ROB/COMPANY_STATS > ....+....1....+....2....+....3....+....4....+....5.. > NBEMP NBPRODUCT REVENUE > 3 - - > ******** End of data ******** > > However, ROB is in my library list and ROBX is not. > > But basically the trigger stayed operative. Which, based on > the previous > discussion, I didn't think it would. > > > Rob Berendt > -- > Group Dekko Services, LLC > Dept 01.073 > PO Box 2000 > Dock 108 > 6928N 400E > Kendallville, IN 46755 > http://www.dekko.com > > > > > > "Mike savino" <mikejsavino@xxxxxxxxxxx> > Sent by: midrange-l-bounces@xxxxxxxxxxxx > 12/15/2005 01:58 PM > Please respond to > Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> > > > To > midrange-l@xxxxxxxxxxxx > cc > > Fax to > > Subject > RE: CRTDUPOBJ of file with trigger renders trigger inoperative > > > > > > > Rob, > > The File is a DDS created file, and the Trigger pgm is RPGLE > added to th > File with ADDPFTRG. > > Now I know that this is different than the situation that > started this > thread but it seems to me that the excuse for this strange > behavior given > by > IBM would apply to any file with a Trigger no matter how it > was created. > But it doesn't.... or if it does, I'd like to know exactly under what > conditions, so that in the future, when creating another > Trigger, we could > > > take that into consideration. > > Mike > > > -- > 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. > > > -- > 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. > > > -- > 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. > > > -- > 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 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.