CALL - Call Another UserCalc#

The Call command is used to allow one UserCalc to act as control for one or more UserCalcs.

A single Calculation UserCalc can CALL other Calculation, Function or Qualifier UserCalcs. If there are more than one Usercalc being called, each is processed in turn after which the control switches back to the main calling UserCalc.

Use a qualifying section to choose the employee once, and then call other UserCalcs to be executed for that employee to save processing time.

The Call command does not have a False path, after returning from the called UserCalc, the 'If Goto' line will be processed next.

If the Call UserCalc is to return a Boolean value of True or False, the variable used to store the result needs to be a Global Variable ($G) in order to be accessible by the calling UserCalc.

The 'If Goto' line executed should then test for the result by using the Global Variable.

Statement:Qualify employees in Group Full-Time. If qualification is true then execute Seniority UserCalc then exit, if the qualification is false execute the 4% Vacation Pay UserCalc then exit.

LineCMDOTOperand 1OPEROTOperand2OTOperand3If GotoElse GoTo
00010CALLUFFULL-TIME GROUP 00100
00100IF$GFULL-TIMEEQBTRUE 0011000200
00110CALLUCFULL-TIME SENIORITY 99999
00200CALLUC4 PERC VAC PAY 99999
99999EXIT 99999