>Hi Sergey;
>If I use COPY TO TYPE SDF (which I agree 'looks right'), how do I create a file that has a header, details and a trailer. ie. How do I append 3 separate 'COPY TO results' into one file?
>
You've two choices depending on the size of the file:
1. You can use FILETOSTR() AND STRTOFILE() if file size is less than 16Mb.
2. Use low-level FREAD()/FWRITE() functions if file is to big.
--sb--