my_str2:="&& t01.p01='{chkt01->p01}'"
my_str2:=my_str2 + " && t01.p303={chkt01->p303}"
my_str2:=my_str2 + " && t01.p302 in ({chkt01->a55p601}, {chkt01->a55p601a}, {chkt01->a56p601}, {chkt01->a56p601a})"
my_str2:=odbctrans(my_str2)

my_str1:=my_stdsql
my_str1:=strtran(my_stdsql, '/*peg_where*/', my_str2)
my_str1:=odbcReadCommand('sql\upd0001_01.sql', .t., .t.)
**textsave('c:\2del\2del\t1.sql', my_str1)
odbcuse(my_str1, .f., 'chkone')

my_tot:=chkt01->t01p04a-chkt01->t01p04t
##DOWHILE !eof() .and. !nrun_stop .and. round(my_tot, 2)<>round(0, 2)

    **update t39
    dopeg('upd0001_02.peg')
    

    aselect('chkone')
    dbskip()
 
##ENDDO
closefile('chkone')
##return