That was my fault..I started using global variables, then switched to local variables but missed switching some of them over. Anyhow, with some guess work and working on this after a good nights sleep, I've got that working.

In relation to that dialog, I also have found a problem with the socket code, specifically if there's no match using first & last name, then I want to search again using just last name..and I also need a message if there is no match.

My socket code follows
Code:
alias find.a.person { 
  if (!$isid) { 
    set %lastname $1 
    set %firstname $2 
    set %street.num $gettok($did(Observer,11),1,32)
    set %street.name $gettok($did(Observer,11),2-,32)
    set %apt $did(Observer,13)
    sockopen findap findaperson.canada411.ca 80 
  } 
} 
on *:sockopen:findap:{ 
  did -b Observer 1,2,3,50
  unset %match
  unset %page*
  sockwrite -n $sockname GET $+(/10649/search/Find_Person?firstname_begins_with=1&firstname=,%firstname,&name_begins_with=1&name=,%lastname,&city_zip=Sarnia&state_id=ON) HTTP/1.1 
  sockwrite -n $sockname Host: findaperson.canada411.ca $+ $crlf $+ $crlf 
} 
on *:sockread:findap:{ 
  if ($sockerr) { 
    echo -a some error occurred oh no. 
    return 
  } 
  else { 
    var %nc 
    sockread %nc
    echo -a %nc
    if ($+(*,We're sorry.  Your search returned no results.,*) iswm %nc) {
      sockclose findap
      did -e Observer 1,2,3,50
      unset %firstname
      sockopen findap findaperson.canada411.ca 80
    }
    elseif ($+(*,%street.num,*,%apt,*,%street.name,*) iswm %nc) {
      var %nc = $right(%nc,20)
      var %nc = $left(%nc,14)
      echo -s %nc
      did -ra Observer 15 %nc
      set %match found
    }
    elseif (*search_id* iswm %nc) && !%search_id {
      set %search_id $gettok(%nc,2,34)
      set %search_id $gettok(%search_id,-1,61)
    }
    elseif ($+(*,%lastname,*,%firstname,*,Total*) iswm %nc) {
      var %nc = $gettok(%nc,-2,32)
      var %nc = $gettok(%nc,-1,62)
      set %pages $calc($int($calc(%nc / 10)) + 1)
      set %pages $calc(%pages - 1)
    }
    elseif ((</html* iswm %nc) || (%match)) {
      sockclose findap
      did -e Observer 1,2,3,50
      if ((!%match) && (%pages)) {
        inc %page
        sockopen findap $+ %page findaperson.canada411.ca 80
      }
    }
  } 
}

on *:sockopen:$(findap $+ %page):{
  did -b Observer 1,2,3,50
  set %limit $calc(%page * 10 + 1)
  sockwrite -n $sockname GET $+(/10649/search/Alpha_Limit?search_id=,%search_id,&old_search_type=Find_Person&sort=&alpha_limit=&lower=,%limit,) HTTP/1.1
  sockwrite -n $sockname Host: findaperson.canada411.ca $+ $crlf $+ $crlf 
}

on *:sockread:$(findap $+ %page):{
  if ($sockerr) { 
    echo -a some error occurred oh no. 
    return 
  } 
  else { 
    var %nc 
    sockread %nc
    if ($+(*,%street.num,*,%apt,*,%street.name,*) iswm %nc) {
      var %nc = $right(%nc,20)
      var %nc = $left(%nc,14)
      echo -s %nc
      did -ra Observer 15 %nc
      set %match found
      sockclose findap*
    }
  }
  elseif ((</html* iswm %nc) || (%match)) {
    sockclose findap*
    did -e Observer 1,2,3,50
    if ((!%match) && (%pages)) {
      inc %page
      sockopen findap $+ %page findaperson.canada411.ca 80
    }
  }
}