have two procedures that work that can called from trigger level within trigger. They passed a number of paramters including one temp-table containing create/delete information , the 2nd program accepts the current new record and the old record
DEF TEMP-TABLE ttnewCustomer LIKE Customer.
BUFFER-COPY customer TO ttnewcustomer.
DEF TEMP-TABLE ttoldCustomer LIKE customer.
BUFFER-COPY oldcustomer TO ttoldCustomer.
RUN TrgWriteTransactionAS.p (input "WRITE", INPUT TABLE ttoldCustomer, "ttoldCustomer", INPUT TABLE ttnewCustomer, "ttnewCustomer").
The create/ delete procedure can be tested with the follwing
DEF TEMP-TABLE ttcustomer LIKE customer.
BUFFER-COPY customer TO ttcustomer.
run TrgCreateDeleteTransactionAS.p (input "CREATE", INPUT table ttcustomer, "ttcustomer").
just change 1st param to delete for delete trigger
anyway this works fine on sports db , any feedback would be welcome certainly not finished article , you will also have to create a history table. check definitions within assign statements