>>>
>>>lcx = ''
>>>lcDelim = ' '
>>>sele one
>>>scan
>>> lcx = lcx+alltr(cHeader)+lcDelim
>>>endscan
>>>lcx = left(lcx,len(lcx)-len(lcDelim))+0h0D0A
>>>
>>>sele two
>>>scan
>>> lcx = lcx+transform(Field1)+lcDelim
>>> lcx = lcx+transform(Field2)+lcDelim
>>> *..
>>> lcx = lcx+transform(Fieldn)+lcDelim
>>> lcx = left(lcx,len(lcx)-len(lcDelim))+0h0D0A
>>>endscan
>>>lcx = left(lcx,len(lcx)-2)
>>>
>>>strtofile(lcx,'Yourfile.ext')
>>>
>>>
>>>something like this?
>>>You can replace TRANSFORM with something mor meaningfull, also remove spaces etc.
>>
>>Seems to work but every fleld has to be worked on separately because they have differnt lengths and properties - but thanks
>
>Then instead of transform() you may just do padr(), and you'd only need a list of lengths for each column.
>Now if you want to have multiline values, i.e. any wrapping of long values, this will get complicated very fast.
How do I denote a carriage return character at the end of each line
Specialist in Advertising, Marketing, especially Direct Marketing
I run courses in Business Management and Marketing