Thanks for the code example sealeopard. I haven't tried it yet but I'm sure it will work. I have misinterpreted SPLIT as being able to delimit multiple spaces hence why I didn't specify that in my previous replies (I'm a REXX coder from way back and I have a tendency to think the same rules apply for Kixtart).

BTW you will be please to know I using GOSUB rather than GOTO in the code with the exception of one GOTO statement and that is used to break the loop. Is there any other command that can break out of a loop when required?

Thanks again
Kenno