It appears that ED is aware of an active select list 0, even when it is not using it. Interesting behavior - is this a bug or feature? Well, in INFORMATION flavour accounts - at least!
In INFORMATION flavour, when you 'X' out, this appears to kill the active select list 0. Hence, upon the next invocation of READNEXT, this will take the ELSE clause, resulting in the termination of the loop. As Adrian pointed out, UV account flavour does change the behavior of some functions/statements. So this could be how it works in INFORMATION and PI/Open accounts. Hence, you can use "N", "Q" and "X" out, at least in INFORMATION flavour, with this code fragment... loop readnext KEY then execute "ED filename ":KEY else exit repeat If the above doesn't work for you, try adding the following (note it may have adverse effects on other EXECUTEs in your code) compiler option at the top of your code. $OPTIONS EXEC.EQ.PERF Regards, David [EMAIL PROTECTED] wrote: > > John what is wrong with this approach > loop > readnext id else done = true > until done do > list<-1> = id > repeat > select list to mylist > loop > readnext id else done = true > until done do > execute "ed ":file:" ":id > repeat > > then before, after, between the two loops you can do whatever you wanted to do > Will That's close to what I did originally. The problem is that ED needs to think that it is reading from a select list for the "X" command to work. If I process the select list outside of ED, ED thinks it is working against a single item and the only way you can exit the middle of a list is with <crtl><C>. -John -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users