Thanks for the info, Shaun. Shaun.Ferguson wrote: > > HP Itanium > UniData Release 7.1 > Basictype p > > Records cannot be deleted from TCL (ECL?) even with a select list > active: > > 1 records selected to list 0. > >>DELETE COUNTY > Do you want to delete records in select list?(Y/N) Y > 'KEY':cannot be deleted, due to trigger constraint. > > ------------------------------------------------------- > > Wow! This is really similar to what I'm trying to do. What is your: OS, > Unidata version, BASICTYPE? > > Also, are you having success with both ECL DELETEs and UniBasic DELETEs? > > Thanks! > > Jonathan > > > Shaun.Ferguson wrote: >> >> We are doing this with a county and zip file - the trigger is on the >> county file and a record cannot be deleted if it's referenced in the > zip >> file: >> >> SUBROUTINE TRIG.COUNTY.DEL (EXECSTAT, DICTFLAG, FILENAME, COUNTY_ID) >> EQU DELETE_DENIED TO 0 >> EQU DELETE_ALLOWED TO 1 >> >> EXECSTAT = DELETE_DENIED >> >> IF (UNASSIGNED(FILENAME) OR (FILENAME NE "COUNTY")) THEN >> RETURN >> END >> IF (UNASSIGNED(COUNTY_ID) OR (TRIM(COUNTY_ID) EQ "")) THEN >> RETURN >> END >> >> CMD = 'SELECT P_ZIP WITH COUNTY_ID EQ "':COUNTY_ID:'"' >> ZIP_LIST = "" >> EXECUTE CMD RTNLIST ZIP_LIST CAPTURING OUTPUT >> >> IF @SYSTEM.RETURN.CODE EQ 0 THEN >> EXECSTAT = DELETE_ALLOWED >> END >> RETURN >> >> Shaun Ferguson >> Applications Architect I >> Wolseley Group Services - 12500 Jefferson Avenue - Newport News - VA - >> 23602-4314 >> T: (757) 989-2916 - F: (757) 989-2801 - E: shaun.fergu...@wolseley.com >> www.wolseley.com <blocked::http://www.wolseley.com/> >> Wolseley plc registered office Parkview 1220 Arlington Business Park >> Theale Nr Reading RG7 4GA United Kingdom >> Registration No. 29846 England > > > Shaun Ferguson > Applications Architect I > Wolseley Group Services - 12500 Jefferson Avenue - Newport News - VA - > 23602-4314 > T: (757) 989-2916 - F: (757) 989-2801 - E: shaun.fergu...@wolseley.com > www.wolseley.com <blocked::http://www.wolseley.com/> > Wolseley plc registered office Parkview 1220 Arlington Business Park > Theale Nr Reading RG7 4GA United Kingdom > Registration No. 29846 England > > > _______________________________________________ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > >
-- View this message in context: http://old.nabble.com/Very-Weird-Trigger-Behavior-tp31450305p31471381.html Sent from the U2 - Users mailing list archive at Nabble.com. _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users