1 TRIGGER PROCEDURE FOR ASSIGN OF Month.StartDate.
2 DEF BUFFER Mth
FOR Month.
4 FIND Mth
WHERE ROWID(Mth
) = ROWID(Month
) NO-LOCK.
5 FIND PREV Mth
EXCLUSIVE-LOCK NO-ERROR.
6 IF AVAILABLE(Mth
) THEN ASSIGN Mth.EndDate
= Month.StartDate
- 1.
8 FIND Mth
WHERE ROWID(Mth
) = ROWID(Month
) NO-LOCK.
9 FIND NEXT Mth
EXCLUSIVE-LOCK NO-ERROR.
10 IF AVAILABLE(Mth
) THEN ASSIGN Month.EndDate
= Mth.StartDate
- 1.