One of the most frustrating tasks for DataStage users is adding a new stage between two existing stages and discovering one of your stages has amnesia.
Amnesia isn’t constrained to soap characters and fraudelent business characters. Stage Amnesia happens when a stage loses a link and gets attached to a different link and forgets all the old link properties. This happens most commonly when you try to add a stage between two existing stages.
For a DataStage novice adding a stage involves adding a new stage, moving the existing link onto that stage and adding a new link. Let me represent old stages as O and the new stage as N:
The problem is one of your stages loses some properties.
The😦 stage was disconnected from the link and got a new link. This means output link properties in that stage went back to defaults. If it is a database stage then all database login and SQL settings disappeared. If it’s a sequential file the file name disappeared. For a transformer stage you an lose a lot of time consuming derivation and mapping settings.
Here is a better way to insert a stage.
The trick is to make a copy of the link so you get two sets of link properties instead of one. Since you cannot copy a link by itself you have to copy the stage and all attached links also get copied
2) —O Cut the start stage to the clipboard.
3) N—O Add the new stage.
4) O— N—O Paste to get the start stage back.
5) O— N—O Rename one of the links to avoid duplicate link names.
6) O—N—O Hook up the links.
Now you have an input and output stage with properties set. You just need to configure the middle stage.
If you have a long chain of stages and you will need to disconnect a link before copying and deleting:
1) O—O—O —O—O Disattach one side of an adjoining stage.
2) O—O— —O—O Cut that stage.
3) O—O—N —O—O Add the new stage
4) O—O—N —O —O—O Paste the stage and rename the link.
5) O—O—N—O—O—O Hook it all up.
And there you have it, inserting stages without Stage Amnesia!