A big Thank You to everyone for the information.
In the end it was straightforward, but I stumbled on a couple of the
steps. Maybe this will help others
Firstly, I wanted the code to be locally, not globally, cataloged. Our
CATALOG verb has "PICK.FORMAT" rather than "INFORMATION.FORMAT" on line
6, so it took me a little while to realise I needed a new CATALOGI verb.
Secondly (and this is the bit where _knowing_ the system manual is wrong
helped) the actual command line I wanted was
CREATE TRIGGER ADDRESS.TRIGGER BEFORE INSERT OR UPDATE ON PERSON FOR
EACH ROW CALLING "ADDRTRIGGER";
I eventually put in two VOC items, CTRIG for the above, and DTRIG which
is
DROP TRIGGER PERSON ADDRESS.TRIGGER;
The code is simplicity itself
008: * See if the address and post code are the same
009: SAME = @TRUE
010: IF NEWREC<5> NE OLDREC<5> THEN SAME = @FALSE
011: IF NEWREC<8> NE OLDREC<8> THEN SAME = @FALSE
012: IF SAME THEN RETURN
013:
014: * Update the date on the file
015: NEWREC<34> = DATE()
016:
017: RETURN
The idea is to pass only changed addresses out to a third party at
intervals to get checked.
Thanks again for the help,
Regards, Keith.
PS. I thought the FROM in "COPY FROM file ..." was a pain, but the
requirement to put "FOR EACH ROW CALLING"? Even if they plan to extend
the command usage in the future, couldn't they make the wild assumption
that, if we don't say *anything* restricting the rows, we actually mean
"FOR EACH ROW"? From the people who gave us OVERWRITING, I guess.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/