Exporting DS components into separate DSX files [more]

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
droberts
Premium Member
Premium Member
Posts: 38
Joined: Wed Apr 01, 2009 4:34 am
Location: UK

Exporting DS components into separate DSX files [more]

Post by droberts »

Hi,

I have been asked to investigate whether it is possible to export all the datastage components in a project or sub-folder as separate DSX files for each component - without having to perform a separate export for each component.

This is to enable version and source control using CVS.

Is this possible - we have v8.0.1?

If anyone has had any experience using CVS as a source and version control tool in v8, any advice would be appreciated.

Thanks,

Daren
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not that I've seen. People with that requirement seem to export the whole thing and then hack it up afterwards - a search for "dsx cutter" should bring up some old conversations and perhaps even a perl script to do that.

Others have done as you've noted - create a control list of the components to export and then a scripted loop through that, exporting them individually.
Last edited by chulett on Wed Mar 31, 2010 12:04 pm, edited 1 time in total.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Mamu Kim
droberts
Premium Member
Premium Member
Posts: 38
Joined: Wed Apr 01, 2009 4:34 am
Location: UK

Post by droberts »

Thanks guys.

Regarding that script DataStageExport1PerJob.bat - it mentions command line. Is that command line on your PC client or from within DS Administrator?

Also, is the output from that script suitable for version control, as in you could export using it and then re-import back into datastage and use the component?

That is ideally what I'm after - being able to export jobs, sequences, parameter sets, etc as single components into CVS and then being able to re-import them without need for any other modifications / add-ons.

Thanks again :)

Daren
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That .bat extension means it is a Windows 'batch' file, akin to a script in UNIX, which means the command line would be on your client PC. And yes, the output should be perfectly suitable for VC with the possible exception if it includes a dump of the executable. Not sure and I've got no way to test anything.
-craig

"You can never have too many knives" -- Logan Nine Fingers
droberts
Premium Member
Premium Member
Posts: 38
Joined: Wed Apr 01, 2009 4:34 am
Location: UK

Post by droberts »

Cheers Craig. I found a DSX Cutter on the site here and have amended that to export my jobs, sequences, parameter sets and table defs. It's based on a Perl script found here:

viewtopic.php?t=113429

The files created are identical bar some header info, I just need to test they import and re-compile and run OK.

Many thanks to John :)

Thanks
Daren
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

The cutter is excellent. The command line tools can only do jobs. Don't think any of them can do routines or parameter sets except when you export the whole project.
Mamu Kim
Post Reply