My first reaction would be to replace the 'fwrites' verb in the last
line of 'writecsv' with 'fappends'.
Maybe there is the case for adding an extra verb ('appendcsv') to the
csv script?
writecsv=: 4 : 0
dat=. ,each 8!:2 each x
f=. '"'&,@(,&'",')@(#~ >:@(=&'"'))
dat=. f each dat
f=. <@(,&LF)@}:@;
dat=. ;f"1 dat
dat fwrites extcsv y
)
appendcsv=: 4 : 0
dat=. ,each 8!:2 each x
f=. '"'&,@(,&'",')@(#~ >:@(=&'"'))
dat=. f each dat
f=. <@(,&LF)@}:@;
dat=. ;f"1 dat
dat fappends extcsv y
)
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Saunders, John (TQEH)
> Sent: Tuesday, 29 May 2007 15:13
> To: Programming forum
> Subject: [Jprogramming] CSV Output
>
> Hi Everyone - I have a boxed array I am writing to a csv file
> using the writecsv verb from the csv script, I run out of
> memory when I write the whole array so I've been writing
> chunks of it to different output files; is there a way for me
> to append the output to an existing file?
>
> Many thanks
> John Saunders
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm