Thanks for sphipp, TomBascom and Casper' help.
I had solved this question.
e.g.
for each xx1 no-lock...:
find first xx2 no-lock where xx2_field1 = xx1_field1 ... no-error.
if avail xx2 then do:
/*wf is a temp-table*/
create wf.
assgin wf_field1 = xx1_field1.
.
.
.
end.
else
do:
create wf. /*added this sentence*/ :blush1:
assign .
.
.
end.
end.