How to change Raw data to Coloumn data fields

Dear All,

I have some data file.see below.

--------------ALARM CLEARING FROM SubNetwork=ONRM_RootMo,SubNetwork=AXE,ManagedElement=CGSN--------------
Alarm Record ID: 25196304
Event Time: 2006-08-28 13:41:35
Event Type: Processing error alarm
Object of Reference: SubNetwork=ONRM_RootMo,SubNetwork=AXE,ManagedElement=CGSN
Perceived Severity: Cleared
Probable Cause: Threshold Crossed
Specific Problem: nocSupervisedMeasMin

Problem Text:
Measurement type gprsMmSgsnUnsuccessfulAttachRequests has exceeded its threshold.

--------------ALARM END--------------
--------------ALARM CLEARING FROM SubNetwork=ONRM_RootMo,SubNetwork=AXE,ManagedElement=CGSN--------------
Alarm Record ID: 25203271
Event Time: 2006-08-29 08:37:24
Event Type: Processing error alarm
Object of Reference: SubNetwork=ONRM_RootMo,SubNetwork=AXE,ManagedElement=CGSN
Perceived Severity: Cleared
Probable Cause: Threshold Crossed
Specific Problem: nocSupervisedMeasMin

Problem Text:
Measurement type gprsSmSgsnUnsuccessfulActivations has exceeded its threshold.

--------------ALARM END--------------

I want to make it like this.see below.

Alarm Record ID Event Time Event Type --- --- ---
25196304 2006-08-28 13:41:35 Processing error alarm --- ---- ---
25203274 2006-08-29 08:37:24 ---- ---- ---- ---

How i can do it?

Help me.

Regards,
Nayanajith.

Here's a crude solution in gnu awk(gawk). You can save the alarms in a file and will have to make a small change.

appears in 2 lines. Remove the new line character after : so that it reads

Then try this code :

awk -F":" 'BEGIN{phead=0}
/ALARM CLEARING/,/ALARM END/{ 
if($0!~"ALARM CLEARING" && $0 !~ "ALARM END")
 {
  if($1!~"Record ID") {data=data"\t"$2; header=header"\t"$1}
  else {data=data$2; header=header$1}
 }
 if($0~/ALARM END/)
   {data=data"\n";
     if(phead==0) print header;phead=1;}
}
END{print data}' filename

Displays the fields as tab separated entries.