Page 1 of 1

Modify a dsx or xml file

Posted: Wed Oct 14, 2009 2:19 pm
by danddmrs
One of the LAN servers accessed in various DS projects is getting replaced and a new name. My task is to change all instances of the server name within my projects from 'serverABC' to 'serverXYZ'.

To accomplish this I exported one of the projects in Manager, created a job to read the .hml file and EREPLACE the server names. Then imported the modified file, mass compiled all the jobs and rescheduled the jobs.

This was a small project but some of the others are much larger and contain only a few server references. Is there a way to capture only those jobs, sequences, and routines that have changed so I don't have to recompile and reschedule everything? Or perhaps a better way to make the change?

Thanks in advance for any suggestions!

Posted: Wed Oct 14, 2009 11:50 pm
by DS_SUPPORT
Kim Duke posted some scripts to search for a particular string in a project. Use that script and change only the required jobs and reschedule them.

Posted: Thu Oct 15, 2009 5:22 am
by chulett
Hmmm... why is this not a job parameter? :?

Posted: Thu Oct 15, 2009 5:28 am
by Sainath.Srinivasan
Or reuse the existing LAN name to the new one and new LAN to current name. In short, swap the names

Posted: Thu Oct 15, 2009 6:48 am
by danddmrs
Parameters are used for jobs and sequences. Command Stages have the server name hardcoded. I don't think the command line can use the parameter. :?:

I'm not sure why they didn't simply rename the servers. Then again, I don't think it's an issue for anything other than DataStage which they didn't realize was impacted until 2 weeks before the scheduled migration was to begin.

I'll look for Kim's scripts and go from there.

Thanks everyone!

Posted: Thu Oct 15, 2009 7:33 am
by chulett
I would wager that they can. I don't have Windows and thus no 'Command' stage but the Execute Command stage can with a small trick which I'm guessing would work in the Command stage as well. :wink: