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