1 TRIGGER PROCEDURE FOR CREATE OF ProgramLink.
4 DEF VAR link-code
AS INT NO-UNDO.
6 DEF BUFFER Lastlink
FOR ProgramLink.
7 FIND LAST LastLink
NO-LOCK NO-ERROR.
9 link-code
= IF AVAILABLE LastLink
THEN LastLink.LinkCode
+ 1 ELSE 1.
11 ASSIGN ProgramLink.LinkCode
= link-code.