V - Local Variable#

Local Variables are defined within UserCalcs and hold their value only for the life of the current UserCalc. They are used to hold temporary or working values that are necessary during a Calculation, Function or Qualifier. Local variables Do NOT hold their value beyond the life of the current UserCalc and therefore, cannot be used to pass values to Functions or Qualifiers.

Local Variables must exist prior to creating a line within a UserCalc that refers to it.
Statement
Let the date variable ‘Probation Date’ be the employee’s hire date plus 3 months. Once the calculation is preformed, the UserCalc then goes to Line 00200.

LineCMDOTOperand 1OPEROTOperand2OTOperand3If Goto Else GoTo
00010 LETVPROBATION DATEBDDBEEM.HIRE_DATEA+3M00200
Statement
Issue a message if the garnishment is less than original deduction.

LineCMDOTOperand 1OPEROTOperand2OTOperand3If Goto Else GoTo
00100 IFVGARNISHMENT AMTLTPC256 0100099999
01000 MSG A GARNISH. DEDN HAS BEEN REDUCED 99999
99999EXIT 99999

Local Variables may be created, viewed, modified or deleted in the Variables tab of the Define UserCalcs (IMUC) form.

UserCalc Local Variables data is stored in the P2K_AM_USER_CALC_VARIABLES table.


Notes #

Click to create a new notes page