Here is my query .. I am trying break the file with site while writing it.
FOR EACH tt_Woorder NO-LOCK BREAK BY tt_Woorder.tt_site:
IF LAST-OF (tt_Woorder.tt_site) THEN DO:
DATASET dsproductionPlan:write-xml("file", lXmlPathName ,true, ?,?, false, false).
END.
end.