Hi James,
Once you have the OutFile variable set as Sergey specified, you will need something like this:
SELECT * FROM InFile WHERE (Chapter%2) = 1 INTO CURSOR Holder
COPY TO (m.OutFile) TYPE SDF &&(or CSV) etc.
USE IN Holder
>hi all-
>
>I need some help with this code..
>nbook, x and are numeric that keep chaging by various increments. What I want to to is create file names for outputing to a text file that change as the numbers change.
>
>example
>outfile = file-1-3.txt
>outfile = file-12-1.txt
>outfile = file-5-9.txt
>
> outfile = "file-"+(STR(nbook))+"-"+(STR(x))
> SELECT * FROM infile WHERE (chapter%2) =1 INTO FILE outfile.txt
>
>thanks
Charlie