       module join
       newfile joinmod.3
       newfile joinmod.4
       call pc_hash(hash,init,80,0,1000)
       call pc_hash(hash1,init,80,0,1000)
       call pc_dbm(db1,open_dbf,me.dbf)
       call pc_dbm(cs1,open_csv,email.csv,,field_names)
       call pc_dbm(db3,join1,cs1,db1,lastname,firstname/1:1,,lastname,firstname/1:1,,lastname,join_lastname,firstname,join_firstname,status,join_status)
       match=0
       not_match=0
       twice=0
       not_member=0
       call pc_dbm(cs1,read)
       do while (pc_dbm_sts)
           if(eq("pc_dbm(cs1,fldu,join_lastname)"," ")) then
               write joinmod.3 "pc_dbm(cs1,fld,firstname) pc_dbm(cs1,fld,lastname) not matched in email"
               not_match=not_match+1
           else if(ne("pc_dbm(cs1,fldu,join_status)","M")) then
               write joinmod.3 "pc_dbm(cs1,fld,firstname) pc_dbm(cs1,fld,lastname) matched but not a member .pc_dbm(cs1,fld,join_status)."
               not_match=not_match+1
               not_member=not_member+1
           else if(pc_hash(hash,insert,pc_dbm(cs1,fld,firstname) pc_dbm(cs1,fld,lastname))) then
              if(pc_hash(hash1,insert,pc_dbm(cs1,fld,firstname/1:1) pc_dbm(cs1,fld,lastname))) then
                   write joinmod.4 "pc_dbm(cs1,fld,firstname) pc_dbm(cs1,fld,lastname) matched in email"
               else
                   write joinmod.4 "pc_dbm(cs1,fld,firstname) pc_dbm(cs1,fld,lastname) matched twice in email"
                   twice=twice+1
               endif
               match=match+1
           endif
           call pc_dbm(cs1,read)
       end do
       print "matched                      = pc_calc(match)"
       print "matched twice                = pc_calc(twice)"
       print "not matched or not a member  = pc_calc(not_match)"
       print "matched but not a member     = pc_calc(not_member)"
       end
