Serach and delete

Hi,
This is the format of the file that i have
CompanyNumber Run Date: 8/3/2006
6:22:15PM

Address:

Person: A03120
SP SNNu
100 1
200 2

CompanyNumber Run Date: 8/3/2006
6:22:15PM

Address:

Person: A03562

SP SNNu
100 1
200 2

i want to delete all the lines between CompanyNumber and Address: and add a new column called as person id to the o/p

this is the o/p that i need

Person SP SNNu
A03120 100 1
A03120 200 2

Person SP SNNu
A03562 100 1
A03562 200 2

Thanks
kk

try something like this :

#!/bin/ksh

sed '/^Company/,/^Address/d;/^$/d' filename |\
awk '{ if (match($0,"^Person")) { person=$2; print " "; printf "Person ";continue }
       print person, $0 
    }' 
          
sed '/^$/d' inpfilename | awk -f awkfile ;

where awkfile contains

/Person/ {
 i=0;
 name=$2
 getline; printf("%-10s%10s%10s\n", "Person", $1,$2);
 getline
 while($1 != "CompanyNumber" || $1 == "" )
 { 
  sp=$1; snnu=$2;
  i++;
  if(getline == 0) break;
 }
 for(cnt=0;cnt<i;cnt++)
 {
  printf("%-10s%10s%10s\n",name,sp[cnt],snnu[cnt]);
 }
 printf("\n");
}
awk '/^Person:/{
per=$2;getline title;
while(match(title,"^ *$")) getline title;
getline;
printf("Person %s\n",title);
printf("%s %s\n",per,$0);
getline;
printf("%s %s\n\n",per,$0);
}' file