InList

All validation programs

Adds a value to a list. Takes an action if the value is already in the list.

Format of Parameters

ListName ListValue  ifAlreadyInListAction

Where:

ListName Name of the list. If the list does not exist, it is created.
ListValue Optional. Value to be added to the list. This can be a variable, a literal in double quotes, or Current_Element. If omitted, Current_Element is assumed.
(ifAlreadyInListAction) Optional. Action to be taken if ListValue is already in ListName. If omitted, a default message displays if the value is already in the list.

Example. This example checks Condition Indicator values to be sure that they are not duplicated within the segment. As each Condition Indicator value is encountered in the EDI file, a rule checks to see if it is in a list called 2300CRCconditionInd. If so, a custom error message is issued. If not, it is added to the list.

Message 32216 is a custom message in file CustomerFSBRERRS.txt. The format of DisplayErrorByNumber is different for rules used by Analyzer.