update f00 set p203=peg_chr2sear(p203,0)
where nr01=1 && p203<>peg_chr2sear(p203,0);
/*peg_end*/        

/**timh3**/
update i00, i13, i23
set i00.timh3 = round(i00.timh3 * (100 + {my_newfpa})/(100 + {my_oldfpa}), {peg_dektim}), 
    i00.remdate=curdate(), 
    i00.remtime=curtime(), 
    i00.remuser='@mass@'
where i00.fpa=i13.p01
   && i13.p01={my_oldcat}
   && i23.p01=1
   && i00.timh3<>0
   && i23.p03_1=1;
/*peg_end*/        

/**timh2**/
update i00, i13, i23
set i00.timh2 = round(i00.timh2 * (100 + {my_newfpa})/(100 + {my_oldfpa}), {peg_dektim}), 
    i00.remdate=curdate(), 
    i00.remtime=curtime(), 
    i00.remuser='@mass@'
where i00.fpa=i13.p01
   && i13.p01={my_oldcat}
   && i00.timh2<>0
   && i23.p01=2
   && i23.p03_1=1;
/*peg_end*/        

/**timh4**/
update i00, i13, i23
set i00.timh4 = round(i00.timh4 * (100 + {my_newfpa})/(100 + {my_oldfpa}), {peg_dektim}), 
    i00.remdate=curdate(), 
    i00.remtime=curtime(), 
    i00.remuser='@mass@'
where i00.fpa=i13.p01
   && i13.p01={my_oldcat}
   && i00.timh4<>0
   && i23.p01=3
   && i23.p03_1=1;
/*peg_end*/        

/**timh1**/
update i00, i13, i23
set i00.timh1 = round(i00.timh1 * (100 + {my_newfpa})/(100 + {my_oldfpa}), {peg_dektim}), 
    i00.remdate=curdate(), 
    i00.remtime=curtime(), 
    i00.remuser='@mass@'
where i00.fpa=i13.p01
   && i13.p01={my_oldcat}
   && i00.timh1<>0
   && i23.p01=4
   && i23.p03_1=1;
/*peg_end*/        


/**p614**/
update i00, i13, f02
set i00.p614 = round(i00.p614 * (100 + {my_newfpa})/(100 + {my_oldfpa}), {peg_dektim}), 
    i00.remdate=curdate(), 
    i00.remtime=curtime(), 
    i00.remuser='@mass@'
where i00.fpa=i13.p01
   && i13.p01={my_oldcat}
   && i00.p614<>0
   && f02.nr01=1
   && f02.p06=1;
/*peg_end*/        


update i00, i13, i17, i14
set i17.pe03 = round(i17.pe03 * (100 + {my_newfpa})/(100 + {my_oldfpa}), {peg_dektim}), 
    i17.remdate=curdate(), 
    i17.remtime=curtime(), 
    i17.remuser='@mass@'
where i00.fpa=i13.p01
   && i13.p01={my_oldcat}
   && i14.p01=i17.pe02
   && i17.pe01=i00.pno
   && i17.pe03<>0
   && i14.p03=1;
/*peg_end*/        

              