RET - Return A Value To Another USERCALC Or Program#

This command allows a Function or Qualifier to return a value to another UserCalc or program.

The RET command appears only at line 99999 in Functions and Qualifiers.

Functions may return a Number, Char(acter), Date or Boolean (True, False) variable.

Qualifiers may only return Boolean (True, False) variable.

As line 99999 may only be used one time, users must refer to a variable in the Return statement. That variable contains the Number, Char(acter), Date or Boolean result.

Statement: If the employee is hired after January 1st, 1990 they are entitled to a vacation accrual. This UserCalc is placed on Attendance Component A010 - Preprocessing UserCalc.

LineCMDOTOperand 1OPEROTOperand2OTOperand3If GotoElse GoTo
00010 IFDB EEM.HIRE_DATE GT D 01-JAN-1990 00100 00200
00100 LETV GIVE ACCRUAL EQ B TRUE 99999
00200 LETV GIVE ACCRUAL EQ B FALSE 99999
99999 RETV GIVE ACCRUAL 99999