Puts command in a script

Hi,

I am trying to output a set of fields to a file:

set outFile   "printHeader.tmp"
set dbFields "REPORT.TIMESTAMP.s,REPORT.CUSTOMER.s,REPORT.CODE.s"

puts $dbFields > $outFile

I receive the following error message:

bad argument "printHeader.tmp": should be "nonewline"
    while executing
"puts $dbFields > $outFile"

Any thoughts?

Try "exec echo $param > /path/to/file"
or

   set fhandle [open myfile w]
   puts $fhandle $output
   close $fhandle
outFile=printHeader.tmp
dbFields='REPORT.TIMESTAMP.s,REPORT.CUSTOMER.s,REPORT.CODE.s'
echo $dbFields > $outFile