Hi everyone, been a while since I visited and even longer since I shared.
We are moving from SQL file triggers to the IDX file triggers and ran into a small issue where we have a trigger on the DICT and a trigger on the DATA levels of the same file.
Getting the DATA level trigger working is simple but how to get the trigger in the DICT working?
Not sure if anyone has done this before but in short the answer is you need two dictionary items: INDEX.ITYPE for the data level and D_INDEX.ITYPE for the dictionary level. To build the index on D_INDEX.ITYPE you need to use the “USING” clause in the CREATE.INDEX command:
CREATE.INDEX DICT FILENAME D_INDEX.ITYPE USING DICT FILENAME NO.NULLS
The trigger will now fire when a record is added/deleted/modified in DICT FILENAME.