PROC UPDTCAMPAIGN sele MASTER close inde && records deleted to to error validations sele UPDATE pack inde on scid tag scid sele MASTER if reccount() = 0 appe from UPDATE && if MASTER file is empty, append all records from UPDATE else scatter fields brand,scid,bounces,opens,totalclicks,uniqueclicks,; optouts,totalmailed,netmailed name updrecs blank store " " to lcupdt store 0 to lnupdrec 1 scan store scid to lnscid if seek(lnscid,'UPDATE') if bounces <> UPDATE.bounces repl bounces with UPDATE.bounces scatter fields brand,scid,bounces name updrecs addi do recordupdates lcupdt= "y" else lcupdt= "" endif if opens <> UPDATE.opens repl opens with UPDATE.opens scatter fields brand,scid,opens name updrecs addi do recordupdates lcupdt= "y" else lcupdt= "" endif endif if !empt(lcupdt) lnupdrec= lnupdrec+1 endif endscan wait wind allt(str(lnupdrec))+" record(s) were updated in the campaign master file" time 1 endif ENDPROC ******************************************************** PROC RECORDUPDATES if used('RECUPDATE') sele RECUPDATE else use RECUPDATE in 0 excl sele RECUPDATE endif append blank gather name updrecs repl all date with date() for empt(date) repl all filedate with val(pcfilename) for empt(filedate) ENDPROC