Yes the
 Code:
CASE $Migstat <> 1

would negate the CASE 1

Missed that


I'm also with Glenn on not removing all the spaces, and it should also have liberal comments for future reference unless it's personal code on your own machine, but most often its for a Company you work for and sooner or later someone else will need to work on your code. Without comments it can make it difficult for a new person to determine what all it does.