Mass update for all stage names - Crazy or possible?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 23
- Joined: Tue Aug 04, 2015 12:45 pm
Mass update for all stage names - Crazy or possible?
Is it possible to complete a mass update of stage type objects names for all our DataStage jobs?
For example, if we wish to update all the CDC names from different names we currently have listed (e.g. CDC_Q, cdcNow, RT_CDC, etc.) to just CDC. How can we accomplish this versus going into each job and updating the text? We have a few thousand jobs, so updating the names for each stage would be very time intensive.
Many thanks in advance!
For example, if we wish to update all the CDC names from different names we currently have listed (e.g. CDC_Q, cdcNow, RT_CDC, etc.) to just CDC. How can we accomplish this versus going into each job and updating the text? We have a few thousand jobs, so updating the names for each stage would be very time intensive.
Many thanks in advance!
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
Yah, that seems like the only possibly viable approach. Meaning you export the entire project and then make passes through the export doing pattern matching / updating strings for all of the names you noted. Then re-import the edited export and cross your fingers. Or better yet import into a new project to see what damage you have done.
Of course, make sure you have plenty of backups on hand.
Of course, make sure you have plenty of backups on hand.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
Yeah, the reason to ask whether OP has prior experience is because possibility to do damage to the project grows higher.
As already noted, have a backup in safe place before you start with editing. Its a good idea to import it in a fresh project and compile all objects to see if it was done correctly.
As already noted, have a backup in safe place before you start with editing. Its a good idea to import it in a fresh project and compile all objects to see if it was done correctly.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.
If this helps OP in planning ... StageName and StageType present in the job can extracted from
Or if needed, more metadata (including stage-name, stage-type, associated links etc) can be parsed from column LAZYLOADINFO_XMETA of following query
Code: Select all
Select J.DSNAMESPACE_XMETA Server_DSProject,
J.CATEGORY_XMETA Category,
J.NAME_XMETA JobName,
S.STAGETYPE_XMETA StageType,
S.NAME_XMETA StageName,
S.STAGETYPECLASSNAME_XMETA
From XMETA.DATASTAGEX_DSSTAGExxxxxxxx S,
XMETA.DATASTAGEX_DSJOBDEFxxxxxxxx J
Where S.CONTAINER_RID = J.XMETA_REPOS_OBJECT_ID_XMETA
Code: Select all
Select J.DSNAMESPACE_XMETA Server_DSProject,
J.CATEGORY_XMETA Category,
J.NAME_XMETA JobName,
D.LAZYLOADINFO_XMETA
From XMETA.DATASTAGEX_DSJOBDEFxxxxxxxx J,
XMETA.DATASTAGEXDSDESIGNVIEWxxxxxxxx D
Where J.XMETA_REPOS_OBJECT_ID_XMETA = D.XMETA_LOCKINGROOT_XMETA ;
-
- Participant
- Posts: 23
- Joined: Tue Aug 04, 2015 12:45 pm
From a Designer menu, you can export DataStage components. It creates a DSX file on your Windows client. Export each whole project. Select the export option to exclude executables.
Save all those DSX files as backups. Now you're dangerous, because you know how to begin.
Then you can very carefully find and replace all occurrences of old names to new names in each copy of each DSX file. This can be done outside of DataStage by using any decent text editor.
Then back in Designer, you can import the modified DSX files into new, empty projects (so that you don't accidentally damage any jobs in the existing projects), run the multi-job compile utility to compile all jobs, and test them out.
This is all at your own risk. I would recommend finding someone who has done it before rather than having someone brand new to the tool.
Save all those DSX files as backups. Now you're dangerous, because you know how to begin.
Then you can very carefully find and replace all occurrences of old names to new names in each copy of each DSX file. This can be done outside of DataStage by using any decent text editor.
Then back in Designer, you can import the modified DSX files into new, empty projects (so that you don't accidentally damage any jobs in the existing projects), run the multi-job compile utility to compile all jobs, and test them out.
This is all at your own risk. I would recommend finding someone who has done it before rather than having someone brand new to the tool.
Choose a job you love, and you will never have to work a day in your life. - Confucius
I've done it. Some randomly generated thoughts...
My naming discipline is very strict. All names, sequences and parallel jobs, follow a repeating (and sub-repeating) pattern that made editing very straightforward.
I have a job activity stage in every sequence that runs a parallel job. If that's true in your design, you must export sequences with parallel jobs or your activity stage will break.
I keep a "master inventory" design document (Excel document), with an accurate listing of all job names. It became my handy checklist to make sure the edits were complete.
Review the changes, review them again, and get two or more people to review it as well. No matter how careful I was, others found "misses" for me.
Regardless of the size of the project, keep everything in one .dsx file. You avoid duplication of effort and have everything in one place to keep your edits "honest".
Exclude executables. I can't emphasize that too much. That also means you will take advantage of the multi-job compile wizard, which is also your final check for missed edits.
Edit: I used SlickEdit. It's powerful and somewhat intuitive to use.
My naming discipline is very strict. All names, sequences and parallel jobs, follow a repeating (and sub-repeating) pattern that made editing very straightforward.
I have a job activity stage in every sequence that runs a parallel job. If that's true in your design, you must export sequences with parallel jobs or your activity stage will break.
I keep a "master inventory" design document (Excel document), with an accurate listing of all job names. It became my handy checklist to make sure the edits were complete.
Review the changes, review them again, and get two or more people to review it as well. No matter how careful I was, others found "misses" for me.
Regardless of the size of the project, keep everything in one .dsx file. You avoid duplication of effort and have everything in one place to keep your edits "honest".
Exclude executables. I can't emphasize that too much. That also means you will take advantage of the multi-job compile wizard, which is also your final check for missed edits.
Edit: I used SlickEdit. It's powerful and somewhat intuitive to use.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
-
- Participant
- Posts: 23
- Joined: Tue Aug 04, 2015 12:45 pm