Export DataStage Jobs as XML

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
rbanavar
Participant
Posts: 2
Joined: Wed Oct 20, 2004 2:57 pm

Export DataStage Jobs as XML

Post by rbanavar »

Hey Guys,
The SCM team for our project expects us to export each job individually :cry: as a dsx file and store it in PVCS, so that they can migrate it. The issue is, we have over 12 projects and each project has a lot of jobs. Individual job export as a dsx file, using the DS Manager would be such a painful and time-consuming task. Does anybody have an automated way to export jobs? Any help would be greatly appreciated!
Thanks
Ravi B
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sure! There is a lovely little DOS batch job over on the ADN website that will automate this for you. If you are subscribed to it, then here is a direct link to the DataStageBackup.zip file in the Product Application file library there. It will export all jobs from all projects on a server.

Only thing to note is that command line exports will be in .dsx format, not XML as you have in your title. Oh, that and the fact that it will export all jobs in one .dsx, not many seperate ones. You would need to tweak it in order to that, either that or search the forum for the 'DSX Cutter' that someone posted awhile ago.
-craig

"You can never have too many knives" -- Logan Nine Fingers
T42
Participant
Posts: 499
Joined: Thu Nov 11, 2004 6:45 pm

Post by T42 »

I believe there IS an option to export as XML. However, I do not know what this option are. I do not have access to a server at the moment to experiment with this.

Play around with that script chulett suggested. Hope you know DOS batch script language.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

T42 wrote:I believe there IS an option to export as XML.
Unless there is something new in 7.5, command line exports are strictly dsx format. Yes, you can do xml exports from the Manager, but they must be done manually.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Try to grep the lines between (including) BEGIN JOB and END JOB lines and put them in seperate dsx. You will need to extract the generic header line in dsx across all jobs.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Here is the cutter I mentioned. No need to reinvent the wheel. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply