Page 1 of 1

Exporting DS components into separate DSX files [more]

Posted: Wed Mar 31, 2010 10:34 am
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

Posted: Wed Mar 31, 2010 10:53 am
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.

Posted: Wed Mar 31, 2010 11:36 am
by kduke

Posted: Thu Apr 01, 2010 1:50 am
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

Posted: Thu Apr 01, 2010 6:37 am
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.

Posted: Thu Apr 01, 2010 6:46 am
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

Posted: Thu Apr 01, 2010 9:45 am
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.