Anudeep,
Even if (status != "A"),,
count value will be decremented and lookup points to next match..
So while loop goes on till it finds a match or till last record. i.e while loop runs till(match_found == 1or count == 0), so we no need to worry about (status != A).

Copyright 1998-2015 Ziff Davis, LLC (Toolbox.com). All rights reserved. All product names are trademarks of their respective companies. Toolbox.com is not
affiliated with or endorsed by any company listed at this site.