When I looked at the syntax of lsearch on the internet, it shows the -all option but when I looked at the Help text in TCL on my Quovadx server, it does not show the -all option. In any case, I reworked the code to iterate through the AL1 segments as you suggested and it is working fine now. Thanks for the responses!