       module join
       newfile joinmod.1
       newfile joinmod.2
       call pc_dbm(db1,open_dbf,me.dbf,joinmod.dbf)
       call pc_dbm(cs1,open_csv,email.csv,,field_names)
       call pc_dbm(db3,join,db1,cs1,lastname,firstname/1:1,,lastname,firstname/1:1,,lastname,join_lastname,firstname,join_firstname)
       match=0
       not_match=0
       call pc_dbm(db1,read)
       do while (pc_dbm_sts)
           if(eq("pc_dbm(db1,fldu,status)","M")) then
               if(ne("pc_dbm(db1,fldu,join_lastname)"," ")) then
                   write joinmod.1 "pc_dbm(db1,fld,firstname) pc_dbm(db1,fld,lastname) to ME using pc_dbm(db1,fld,join_firstname)"
                   call pc_dbm(db1,write,status,"ME")
                   match=match+1
               else
                   write joinmod.2 "pc_dbm(db1,fld,firstname) pc_dbm(db1,fld,lastname) not matched"
                   call pc_dbm(db1,write,status,"MS")
                   not_match=not_match+1
               endif
           endif
           call pc_dbm(db1,read)
       end do
       print "matched     = pc_calc(match)"
       print "not matched = pc_calc(not_match)"
       end
