It's difficult to advise you without knowing what the code is doing inside those while loops, but in your position I would try and avoid using them completely, and do something more like this:
Code:
awk '
/^RX SYSTEM/ { section=$3 }
section=="CFO" {
print "processing CFO stuff: " $0
}
section=="DAX" {
print "processing DAX stuff: " $0
}
section=="TC" {
print "processing TC stuff: " $0
}
' inputfile > outputfile