SCAN FOR custno=ncustno ... ENDSCANMakes code simplier and faster (with appropriate indexes in place).
>go top >do whil not eof() > if custno=ncustno && append only in custno is = nCustno > scatter to mxx > sele nan > append blank > gather from mxx > sele xldata > endif > sele xldata > skip >enddo>clos data