Page 1 of 1

A script to export individual Datastage components?

Posted: Thu Oct 30, 2003 2:58 am
by victorbos
Hello everybody,

For the reason of interfacing datastage dsx files with our sourcecontrol tool, I would like to be able to export all datastage components in my project to SEPARATE dsx files.
This would enable us to control the versioning of each individual component.
Doing this exports manually is very tedious and also prone for errors, because each component must be selected manually in manager, and the name of the dsx file must be type in by hand.
So: what I am looking for is some script that reads datastages metadata from a project and exports to individual files following that content.
Does such a script exist, and if not: would it be possible to create one?

thanks in advance for all help,

Victor

Posted: Thu Oct 30, 2003 6:10 am
by ray.wurlod
No and no.

What you might be able to do is to intercept all traffic between your Manager client and server while you're exporting one component. Do this by enabling server-side tracing before opening Manager. Then you could follow the calls to helper subroutines and replicate this in a DataStage BASIC routine. Don't forget to disable server-side tracing as soon as possible; it does collect a lot of information.

The first part of the trace file is the queries and responses to populate the Manager client. You can identify your export by means of some of the arguments (for example, the name of the object you choose to export).

Posted: Thu Oct 30, 2003 7:59 am
by chulett
Victor, I think you'll find someone here (if you search) that wrote some custom scripts to do this or perhaps they'll chime in on this thread. From what little I recall, it would hack out individual dsx files from the project export... :?

That being said, any particular reason you wouldn't just use Version Control instead of going to all that pain to interface with an external SCCS tool that has no idea what DataStage is?

Posted: Thu Oct 30, 2003 8:50 am
by kcbland
You're looking for a DSX cutter, because everything else is a hack.

Wait a minute, did I really type that? :shock:


A robust version control tool has to accommodate everything from Word documents to DS jobs to perl scripts to ksh scripts to c programs to Project plans. I not a fan of DS Version because it's not an enterprise tool and I'm a big fan of enterprise tools.

So, what we do is use a simple perl script to cut the dsx. It's rather simple, and if you're going to hack, it's the smallest effort you're likely to find.

So, if you want a DSX cutter, just post that demand. I know everyone out there has their favorite for you to choose (I have two).

Posted: Thu Oct 30, 2003 11:53 am
by Teej
In fact, Ascential will be providing a script that automatically pulls from all projects, so this cutter routine within that script (cut by categories), would REALLY rocks for our site. (They will be providing it on the new Developer NET in December)

Do post a sample or two! :)

-T.J.