NUM - Convert to a number #

Convert Operand 2 into a number and store result in Operand 1

Statement
Wage Scale codes are held in the database as data type Char. The UserCalc must check what the next scale step is by adding 1 to the current scale and then re-converting that back to a code to read its value from the database.

LineCMDOTOperand 1OPEROTOperand2OTOperand3If Goto Else GoTo
00010 LETVSCALE AS NUMBERNUMDBSWS.SCALE_CODE 00020
00020 LETVSCALE PLUS 1ADDVSCALE AS NUMBERN 100030
00030 LETVSCALE AS CODECHARVSCALE PLUS 1 00040
00040 LETVMESSAGEEQAEE SHOULD BE AT SCALEVSCALE AS CODE00050
00050 MSGVMESSAGE 99999
99999 EXIT 99999


Notes #

Click to create a new notes page