grab a table copy to a table called temp and place the code into a prg then runit
USE temp
COPY TO test.txt TYPE deli
fieldstring=''
FOR counter=1 to FCOUNT() step 1
fieldstring=fieldstring+ALLTRIM(FIELD(counter))+IIF(counter<FCOUNT(),',',CHR(10))
ENDFOR
filehand=FOPEN('test.txt',12)
=FWRITE(filehand,fieldstring,LEN(ALLTRIM(fieldstring)))
=FCLOSE(filehand)
CLOSE ALL
MODIFY COMMAND test.txt
Steve Bowman
steve.bowman@ultraex.com