Export data from DB2 (MAINFRAME) table into flat file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
nghadi
Participant
Posts: 7
Joined: Mon Mar 28, 2005 12:59 pm

Export data from DB2 (MAINFRAME) table into flat file

Post 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?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nghadi
Participant
Posts: 7
Joined: Mon Mar 28, 2005 12:59 pm

Post 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.
T42
Participant
Posts: 499
Joined: Thu Nov 11, 2004 6:45 pm

Post 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.
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Post 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.
Post Reply