Hi Pamela
> USE "&tmpfile"
> COPY TO "&tmpfile2" type delimited
> ENDSCAN
What you have for the COPY TO should work, but it looks like maybe your USE "&tmpfile" might be opening in the same work space as the zonelist table driving your SCAN. So when it hits ENDSCAN it doesn't know where to go to get the next store to run thru the loop. Try adding an IN clause to the USE command, then select the tmpfile, then do your COPY TO.
HTH
Roxanne M. Seibert
Independent Consultant, VFP MCP
Code Monkey Like Fritos