1 TRIGGER PROCEDURE FOR CREATE OF LinkNode.
5 DEF VAR node-code
AS INT NO-UNDO.
7 DEF BUFFER LastNode
FOR LinkNode.
8 FIND LAST LastNode
NO-LOCK NO-ERROR.
10 node-code
= IF AVAILABLE LastNode
THEN LastNode.NodeCode
+ 1 ELSE 1.
12 ASSIGN LinkNode.NodeCode
= node-code.