Welcome to forums, I hope you will enjoy learning and sharing knowledge here. Coming to your question, if your actual Input_file is same as sample shown then following may help you in same.
You could HIT a THANKS button here if you want to thank to a person for a useful post as post's left corner. Coming to your question now, if those values are NOT fixed then could you please do let me know what is the pattern to catch these lines then?
The red parts are fixed, and we have to identify using them.
The blue parts can change.
So whenever there is a pattern ":20C::MITI//" is occurring after the pattern ":20C::RELA//" within a block, the value of the pattern ":20C::MITI//" which is "NETT/QWERTY12345" has to replaced in the pattern ":20C::RELA//".
If not, try this modification of Scrutinizer's fine proposal:
awk '
{for(i=1; i<=NF; i++) {if ($i~/:20C::RELA/) R = i
if ($i~/:20C::MITI/) M = i
}
if (M) {$M = $R
sub ("RELA", "MITI", $M)
}
R = M = ""
}
1
' RS= FS='\n' OFS='\n' ORS='\n\n' file