Awk: Data Insert

Hi guys, I'm having some difficulties in insert some details to the following contents.
I need to insert "TEST" under MIR & a value "25" to the next line.

So far, I am able to insert "TEST" by using awk to capture MIR as the identifier.
However, I am having some difficulties in inserting "25" to the 2nd split line after MIR

Recordset MIR and ATR contains split lines.
I need some help to join up the split lines.
Afterwhich I need to insert value 25 to MIR recordset.
Can any nice souls here help me? Thanks

Existing Content

FAR:A|4|2
ATR:12:21:05 5-Jul-2009|
/image/bin.rls/stdf_repair XXX_TCS5B_WS2_R03_09Jul05_
09_48.stdf
MIR:3UPF22030.1||TCS5B Probe|T09-J750|J750|
||||||||||SG|||||||T09-J750
SDR:1|0|0,1|Prober|H05|ProbeCard|P02||TCS5B_WS2_R03|0|0
PMR:256|768|2|C10, k4.8, k3.5|AVDD|1|0
PMR:256|768|5|C10, k4.8, k3.5|AVDD|1|1

Expected Output
FAR:A|4|2
ATR:12:21:05 5-Jul-2009|/image/bin.rls/stdf_repair XXX_TCS5B_WS2_R03_09Jul05_09_48.stdf
MIR:3UPF22030.1|TEST|TCS5B Probe|T09-J750|J750|||||25||||||SG|||||||T09-J750
SDR:1|0|0,1|Prober|H05|ProbeCard|P02||TCS5B_WS2_R03|0|0
PMR:256|768|2|C10, k4.8, k3.5|AVDD|1|0
PMR:256|768|5|C10, k4.8, k3.5|AVDD|1|1

PS:
This is the code I'd done for inserting "TEST"

cat $atdf_file | nawk 'BEGIN {
FS="|" } {
where = match($1,"MIR*")
# Process MIR field
if (where != 0) {
replace=0
if($2 == ""){
$2 = "TEST"
OFS = "|"
print $0
break }
if(replace==0){
print $0 } }
else {
print $0 }
}
' > tmp.atdf

Try the following:

awk -v FS='|' -v OFS='|' '{
    if (substr($1,1,3) == "MIR") {
        mir=1
        $2="TEST"
    }
    else if (mir == 1) {
        $6="25"
        mir=0
    }
    print $0
}' input_file

Hi Thanks,
I might had made a mistake in my first post.
There's supposed to be a carriage return 1/2 way.
MIR should consists of 2 lines.

The only way to identify which line for my script to insert "25" is to locate the line containing MIR and go into the next line. However, I wish to join up the 2 lines before inserting the value.

perl:

while(<DATA>){
	chomp;
	if (/^(FA|AT|MI|SD|PM)R:/){
		print "\n" ;
		if(/^MIR:/){
			my @tmp=split("[|]",$_,11);
			@tmp[1,9]=('TEST','25');
			print join "|", @tmp;
		}
		else{
			print $_;
		}
	}
	else{
		print "$_";
	}
}
__DATA__
FAR:A|4|2
ATR:12:21:05 5-Jul-2009|
/image/bin.rls/stdf_repair XXX_TCS5B_WS2_R03_09Jul05_
09_48.stdf 
MIR:3UPF22030.1||TCS5B Probe|T09-J750|J750|
||||||||||SG|||||||T09-J750
SDR:1|0|0,1|Prober|H05|ProbeCard|P02||TCS5B_WS2_R03|0|0
PMR:256|768|2|C10, k4.8, k3.5|AVDD|1|0
PMR:256|768|5|C10, k4.8, k3.5|AVDD|1|1