Frank,
This might be a case of a known GPC problem that causes a stack overflow if the loop runs very often. If it's that, than the crash should occur sooner or later depending on the stack limit set.
A work-around in this case could be to assign the loop condition (substr(zeile2,1,ls)=suchstr) to a Boolean variable and test this in the `until'.
Thanks a lot! The program seems to work now...
Stephan