$L - List#
Lists are used in order to simplify the number of UserCalc lines it would take to eliminate employees from the selection.
A list may be used when you need to make a comparison to more than one value.
For example: You may need to check if an employee is in any of three different groups, which normally would necessitate three UserCalc lines to check one group after the other. With the list, however, the user may define the accepted values – such as membership in any of the three different groups.
Then one UserCalc may be used to see if the employee’s group is in the list. Alternatively, the UserCalc could check if the employee’s group is not in the list.
The two operands used with $L are:
IN | In List |
NN | Not In List |
In this example, in Line 00010 the UserCalc checks to see if the value in Operand1 is included in the list identified in Operand2. If the employee is in the group list, then Line 00020 instructs the UserCalc to see if Operand1 is NOT included in the Payroll List (Operand2).
Line | CMD | OT | Operand 1 | OPER | OT | Operand2 | OT | Operand3 | If Goto | Else GoTo |
---|---|---|---|---|---|---|---|---|---|---|
00010 | IF | DB | DGR.GROUP_CODE | IN | $L | GROUP LIST | 00020 | 99999 | ||
00020 | IF | DB | PPR.PAYROLL_CODE | NN | $L | PAYROLL LIST | 00100 | 01000 |
Lists are created and maintained as lexicon values in the Maintain Lexicon (IMLN) form. (The name of the list is the lexicon name and the list is maintained as the values within that lexicon.)
Maintain Lexicons #
A lexicon provides a controlled set of values, which a particular field may contain.Do not use special characters (!,@,#,$,%,^,&,*,etc.). Spaces, dashes and underscores are acceptable.
The Type must be User-Created.
The Displayed Value must be the code to be looked at by the UserCalc