CustTable custTable;
DirPartyTable dirPartyTable;

while  select  dirPartyTable order by Name
 join       custTable where  dirPartyTable.recID==custTable.Party
 {
      warning(custTable.AccountNum);
 }