LIKE_OPERATOR
Back to current versionRestore this version

LIKE - Is Like #

The Is Like (Like) operator checks to see if the value in Operand 1 is the same as the value in Operand 2. (Operand 2 must be a masked string using acceptable Oracle search criteria).

Statement
If the employee is in any sales department, give a bonus of $500.00 (stored in PC 5000).

LineCMDOTOperand 1OPEROTOperand2OTOperand3If Goto Else GoTo
00010 IFDB DDP.DEPARTMENT_CODELIKEASALES% 00100 99999
00100 LET PC 5000 EQ N 500 99999
99999 EXIT 99999

In the example shown above, if the employee’s department began with the string ‘Sales’, the UserCalc would go to line 100 to give the bonus. Acceptable department codes would be ‘Sales-001’ or ’SalesHeadOffice’ but not ‘GroupSales’.


Notes #

You must be logged in to create a notes page.