A script to export individual Datastage components?

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
victorbos
Participant
Posts: 24
Joined: Tue Jul 15, 2003 2:05 am
Contact:

A script to export individual Datastage components?

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

Post 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).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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?
-craig

"You can never have too many knives" -- Logan Nine Fingers
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post 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).
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Post 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.
Developer of DataStage Parallel Engine (Orchestrate).
Post Reply