procedure actualizar(var socio:tsocio;var pago:tpago;var socion:tsocio);
var
rsoc,rnew:reg1;
rpago:reg2;cuenta:word;
begin
clrscr;cuenta:=0;
assign(socio,'c:userstomassocio.dat');assign(pago,'c:userstomaspago.dat');assign(socion,'c:userstomassocion.dat');
reset(socio);reset(pago);rewrite(socion);
while(not(eof(socio)))and(not(eof(pago)))do
begin
read(socio,rsoc);read(pago,rpago);
if rsoc.cod=rpago.cod then
begin
rnew:=rsoc;
rnew.deuda[rpago.mes]:=0;
write(socion,rnew);inc(cuenta);
end
end;
writeln('se ingresaron',cuenta,'registros');
close(socio);
close(pago);
close(socion)
end;