
Packed Decimal downloaded on pc is just a stream of bytes without any comma. I was supposed to reformat data. If I undersdand bytestring-csv library, it parses csv format data. Thanks for the hint. I'll investigate next time when I have to deal with huge files. Bartek On Thursday 04 June 2009 23:21:21 you wrote:
Can you use the bytestring csv parser (or convert it into a pretty printer?)
bartek:
Hi Folks,
I had to transform Packed Decimal file into csv format (does anybody here know what this Mainframe format is?). Because of the file size I could not do this on mainframe directly. So I've created simply program using ByteString. Generally I'm happy with my solution: pgm processes arroud 2MB/s on my pc, so my 3GB file was transformed in reasonable 30 min time.
My question is: how to do this faster?
{code} module Main where import qualified Data.ByteString.Lazy as B main = B.getContents >>= myPrint . myConcat . B.unpack
^^^^^^^^^^^^^^^^^^^^^ That looks bad.
-------------------------------------------------------
participants (1)
-
Bartosz Wójcik