MSG - Sends A Message To The UPCALC Report#

Sends a user-defined message to the message table. This message may be used as a warning or to report an error to users.

Messages may be straight text, or may be a Variable. This will allow a standard message to be set up as a Global Variable and then used in several UserCalcs. Variables may be built or concatenated using the EQ Operator and using both Operand2 and Operand3 to contain both text and database items or other Variables.

Statement
If the Garnishment is less than original deduction than issue a message.
Statement
A message needs to be issued when an employee’s 401K/GRSP contribution reaches the yearly maximum. This maximum changes every year, so a User Variable ($C) will be used to print out the Limit amount. The message is longer than would fit in one operand field (see line 00110).

LineCMDOTOperand 1OPEROTOperand2OTOperand3If GotoElse GoTo
00100 IFVGARNISHLTPC256 0100099999
01000MSGAGARNISH. DEDN. HAS BEEN REDUCED. 99999
99999EXIT 99999

Result: >>>>Smith’s 401K dedn has reached the max of $4000<<<<

LineCMDOTOperand 1OPEROTOperand2OTOperand3If GotoElse GoTo
00100LETVMESSAGEEQDBEID.LAST_NAME 00110
00110LETVMESSAGEEQA>>>>VMESSAGE00120
00120LETVMESSAGEEQVMESSAGEA‘s 401K dedn has reached the max of $00130
00130LETVMESSAGEEQVMESSAGE$CLIMIT00140
00140LETVMESSAGEEQVMESSAGEA<<<<00150
00150MSGVMESSAGE 99999
99999EXIT
The User Variable Limit has been defined as a char so that Operand2 and Operand3 are of the same type. Otherwise, it would be necessary to convert Limit to a char before creating the message.


Notes #

Click to create a new notes page