function hrbmain()

set excl on

sele 1
use fatx
index on fnum to xFtCt
sele 2
use sf_fatnf
set relation to fnum into fatx
repl all fplanopag with fatx->fplanopag for fatx->fplanopag>0 
repl all fcartao with fatx->fcartao for fatx->fcartao>0
repl all fvalcv with fatx->fvalcv for fatx->fvalcv>0
repl all fvalch with fatx->fvalch for fatx->fvalch>0
repl all fvalca with fatx->fvalca for fatx->fvalca>0
repl all fvalct with fatx->fvalct for fatx->fvalct>0
close all

alert("Concluido")

return