splitting into multiple files
Posted: Fri Sep 14, 2007 7:06 am
Hi,
I am having a big DB2 table in terms of number of rows. After passing through various stages I need to write into a flat file, so I am writing into a .csv file.
Now as the number of records are very large in terms of billions, I want to store the result into multiple files with same name with last 2 or 3 characters as suffixes like.
flatfile_000.csv
flatfile_001.csv
flatfile_002.csv
.
.
.
.
Like this I want to create my target file. I am supposed to make each file with 50,000 records each.
Can anybody tell me how can I achieve this?
Thanks
Kavuri
I am having a big DB2 table in terms of number of rows. After passing through various stages I need to write into a flat file, so I am writing into a .csv file.
Now as the number of records are very large in terms of billions, I want to store the result into multiple files with same name with last 2 or 3 characters as suffixes like.
flatfile_000.csv
flatfile_001.csv
flatfile_002.csv
.
.
.
.
Like this I want to create my target file. I am supposed to make each file with 50,000 records each.
Can anybody tell me how can I achieve this?
Thanks
Kavuri