Was this problem solved with this "DO i=1 TO stem.0"-EXEC? Here my 0.02$ that could lead to a Piping-only solution: How about to REVERSE before SORTing? So your (minimalistic) example would look like this: ed.sidoeg ed.sidoegbc moc.ovonel moc.ovonelcfm moc.tta moc.ttacrr
Now it is obvious what is key (reversed domain names) and what is the rest of the record. As you have already two lists you need no code to trigger the start of a new run of records, just INSERT an indicator from which list a record is before SORTing. Your example would come out like this (assuming the list of addresses is a bit longer: 1 ed.sidoeg 0 ed.sidoegbc 0 ed.sidoeg... 0 ed.sidoeg... 0 ed.sidoeg... ... 1 moc.ovonel 0 moc.ovonelcfm 0 moc.ovonel... 0 moc.ovonel... ... 1 moc.tta 0 moc.ttacrr ... Now, how to continue is up to your flavor. Probably my hint comes too late, but this "DO i=1 TO ..." bothered me. Ciao.....Mike Mit Alstom die Umwelt schützen. Ist es wirklich notwendig diese E-mail zu drucken? :._______________ VERTRAULICHKEIT: Diese E-mail und alle angehängten Dateien sind vertraulich und privilegiert. Sollten Sie nicht als namentlicher Empfänger aufgeführt sein, informieren Sie unverzüglich den Absender und machen Sie den Inhalt nicht für Dritte zugänglich, noch darf dieser gedruckt oder für andere Zwecke verwendet, kopiert oder auf irgend einem Medium gespeichert werden.
