Page 1 of 1

Export data from DB2 (MAINFRAME) table into flat file

Posted: Mon Mar 28, 2005 1:07 pm
by nghadi
How do I export data from DB2 (MAINFRAME) table into flat file from command line without creating datastage job? Source and target will be specified on command line to dsjob. I'm expecting datastage should pick up table layout (metadata) from source parameter. Is it possible? Is there any other quick way to dump data from source tables into flat file?

Posted: Mon Mar 28, 2005 1:32 pm
by ray.wurlod
It's not possible.
You want to do something without creating a DataStage job and get it to happen via dsjob, the command that runs DataStage jobs? The question is internally inconsistent.
Further, DataStage is metadata-driven; there is no out-of-the-box mechanism for handling metadata dynamically. You can, of course, write your own routines for this, but you'd still need a separate DataStage job for each possible combination of column definitions.
DataStage does not support creating jobs "on the fly", though there is - or used to be - an API for doing so. But you have to write them yourself.

Posted: Mon Mar 28, 2005 2:04 pm
by nghadi
Thanks Ray.
I work on other ETL tool, which does this on the fly. I can reuse same job for different sources and targets by just specifying different patameters.

Posted: Wed Mar 30, 2005 10:31 pm
by T42
Ah, it appears he want a command line interface scripting tool.

I am sorry, but DataStage is not a command line interface scripting tool. Especially not EE. I believe you are better off using the tools provided with DB2.

Posted: Fri Apr 01, 2005 11:01 am
by bcarlson
We recieve files from the mainframe that are complete extracts of DB2 tables. I don't know the specifics, but our mainframe people refer to a utility called DB2 Unload.

Hope this helps.