rob@xxxxxxxxx wrote:
Well, if you are distributing software then CRTCSVF is not on my systems
and that could be an issue.
Yeah, CRTSAVF is a third-party package.
I was so disgusted with IBM on V5R3 and up what they did with CPYTOIMPF
and CPYFRMIMPF that I won't use them anymore. I find that writing my own
is:
- faster
- more granular on handling errors.
- doesn't blow me grief on CCSID crud.
I know how much you hate CPYxIMPF, so here's an interesting option, Rob:
MySQL supports a CSV type. There are a number of issues that limit the
usefulness of that storage method (no primary keys, for example), but it
seems pretty well suited to import/export processing. Of course you're
limited to whatever MySQL thinks is appropriate for formatting, but it
seemed pretty reasonable - double quotes for alpha fields, that sort of
thing.
So step one, if you're doing something on a regular basis, you could
write a simple Java program to read from DB2 and write to the CSV file.
Yeah, I know this is a little Rube Goldberg, but here's the thing: MySQL
AB is supposedly working with IBM to provide a native DB2 engine for
MySQL. I don't know what the status of this project is, but if it
happens, you could theoretically install MySQL on the i and create MySQL
definitions for both your CSV file and your DB2 file. You could then
use the MySQL GUI to run ad hoc queries to extract data from DB2 and
insert it into the CSV file (and vice versa).
Yeah, I know, it's a lot of futures and finger crossing, but as a
potential strategic direction it may have some merit.
If you want to see a couple of pictures including the query browser (I
even show dumping data from a traditional MySQL table into a CSV file),
I wrote about installing and running MySQL here:
http://www.mcpressonline.com/database/mysql/mysql-and-ibm-i-where-does-mysql-fit-in-a-db2-world.html
Joe
As an Amazon Associate we earn from qualifying purchases.