Well i would suggest go and pick a book and learn basic shell scripting. We are not here to baby sit and teach you very basics of unix shell scripting. I saw your other post earlier and now this a continuation of that. You cant rely on the forum for completing your task, what ever you are trying to achieve. What you are asking here is very basic , trying to write a loop and it is first step in logical programming and nothing to do with unix as well.
Watch out for upper cases. The commands and statements are case sensitive, therefore WHILE is not the same that While or while. By the way the correct one is `while' all lower case.
IFS=read should be IFS= read with space after the `='
If this is not actually the way you have it in your script, please, post the unchanged relevant portion of the script.
I'm feeling a bit lost looking at your script, but are you really reading input_text.txt five times (twice in the while loops, and thrice with awk)? And do you intentionally overwrite the line variable in the inner loop? OK, you break out of the outer loop, but why, then, do it at all?
Your awk command all seem to search for similar conditions and then act on some variables - couldn't you do that in one awk script alone?
I'd propose you do some blueprint of the logics required and then start coding from scratch.