Hi Steven The REMOVE statement process a multivalued list. The SETTING clause will set the variable to either 3, or 2, or 1, or 0 depending on the value of the delimiter last encountered... 1 for @FM 2 for @VM 3 for @SM 0 for End Of String
If the array consists only of @FM, then MORE will be set to 1 for each iteration (since the delimiter it is encountering each time is an @FM) and then, when the last element is read, MORE will be set to ZERO, and the WHILE MORE will fail, thus the loop is exited. If FM.ARRAY is empty, MORE will return as 0 and the loop will exit, but you're right - the "WHILE MORE" line should be one line higher.. UNIQ.LIST = '' LOOP REMOVE NEXT.ID <http://next.id/> FROM FM.ARRAY SETTING MORE WHILE MORE LOCATE(NEXT.ID <http://next.id/>,UNIQ.LIST,1;POS) ELSE UNIQ.LIST<-1> = NEXT.ID <http://next.id/> REPEAT the WHILE statement is in effect a "while it is not zero" and the second it becomes a zero, the loop exits. _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users