Extract block of data and the error reason too. So so urgent

Hi , this is my first enty in our forum.

Problem scenario:

Using informatica tool am loding records from source DB to target DB. While loading some records getting rejected due to some reason. Informatica will capture those rejected records in session log file.now the session log ll be available with rejected records and the reason for the rejection as below

this is the reason for the error
ORA-12899: value too large for column "STN"."STN_SAP_MATERIAL_ATTR"."SMA_STD_DESCR" (actual: 19, maximum: 18)
.
.
.
these are the values for the rejected row:
2009-07-09 15:38:23 : INFO : (5439 | WRITER_1_*_1) : (IS | UDEV811_2_IS) : NDIP_DEV_811_N1 : CMN_1053 : : Rowdata: ( RowType=0(insert) Src Rowid=129406 Targ Rowid=129406
SMA_NET_WEIGHT (SMA_NET_WEIGHT:Double:): "0.001"
SMA_UNIT_OF_WT (SMA_UNIT_OF_WT:UniChar.3:): "KG"
SMA_VOLUME (SMA_VOLUME:Double:): "0.001"
SMA_VOLUMEUNIT (SMA_VOLUMEUNIT:UniChar.3:): "M3"
SMA_EANUPC (SMA_EANUPC:UniChar.18:): ""
SMA_IND_SECTOR (SMA_IND_SECTOR:UniChar.1:): "A"
SMA_BASE_UOM (SMA_BASE_UOM:UniChar.3:): "ST"
SMA_COMPETITOR (SMA_COMPETITOR:UniChar.10:): ""

)
...........unwanted details.....again above mentioned things ll come.

between both the required details , some not required data also there.
We can read the reason for the rejection using the value [/SIZE][/SIZE][/FONT]ORA- or the tablename mentioned in the same line.
we can jump to the row value details using the keyword Targ Rowid and from next line we can get the values for each fields and should read the values till the close bracket ")".
I have to loop through the whole session log file to get all the rejected rored with reason. and i want the rejection reason and the values in single row and next record's rejection reason and values in next line ... an so on , in new file.

shell script is preferable. its as ur wish. but give me a sloution

Plz plz help me on this...

Try and adapt the following code :

awk '
   /^ORA-/ {
      if (Text) print Text;
      Text = "------------\n" $0;
      next;
   }
   /Targ Rowid/ {
      Values = 1;
      next;
   }
   /^)/ {
      Values = 0;
      next;
   }
   Values {
      Text = Text "\n" $0
   }
   END {
      if (Text) print Text;
   }

    ' inputfile

Jean-Pierre.

Lovely !!!!!

Pierre its working Pierre !!!!! i was pulling my hair for this..

but can u plzzzzzz explain each line what its doing..
becaze am not much aware abt AWK script dude :o