Page 1 of 1

How to batch change job names

Posted: Wed Sep 14, 2011 2:18 am
by xicheng_my_love
The scenario is as following: we have a sequence and this sequence invoke several jobs. All these items are in the same folder. Now we need to change the sequence name and the invoked job names to add '_T'. Can we export all the sequence and jobs to a DSX file and replace some strings in the DSX file to accomplish the task of append '_T' to the sequence name and job names? Or by updating metadata table in the metadata database? Or any other convenient methods can be applied?

Posted: Wed Sep 14, 2011 7:14 am
by chulett
Or you could simply use the GUI. But yes, a dsx export can be carefully edited and reimported... but then both names will exist and you'll need to delete all of the old jobs.

Posted: Wed Sep 14, 2011 9:13 am
by suse_dk
But using the GUI for changing names of jobs that are being invoked in a sequencer is rather a big pain if you map a lot of parameters.
Reason: You can't change the name of the job in the job activity stage, but will need to browse for it, and then all parameter mappings disapper even if you new job uses the exact same parameters.

Posted: Wed Sep 14, 2011 9:17 am
by chulett
That's true... forgot about that little nugget.

Posted: Wed Sep 14, 2011 12:44 pm
by FranklinE
There's only one safe way to do this. In Designer copy each sequence and job, rename the copies to what you want (_T, or whatever), compile the jobs and elevate them up to your test and production regions.

Once you are satisfied that they work properly, delete the "old" versions.

I've learned from recent painful experience that you should let DataStage manage your sequence/job metadata and not try to "fool" it. Also, I've learned that the folder structure you create in the UI to keep your sequences and jobs organized is ignored at runtime. You can see that when you attempt to reuse jobnames in different folders. DataStage prevents that from happening.

Posted: Wed Sep 14, 2011 11:24 pm
by xicheng_my_love
When you change the job name, DS will automatically give u a report of Impact Analysis. I am thinking that just as DS can do Impact Analysis, then there should be a shortcut to do the renaming task. Maybe DS should do further. After giving the Impact Analysis, it should prompt a wizard sort of thing to change the name where it is used.

Posted: Thu Sep 15, 2011 1:46 am
by ray.wurlod
Then you can log an enhancement request, either through DSXchange or through your official support provider.