Hello,
I've the following two questions on which I was trying to do some research (including searching in this forum) without much success:
1. There is an option to set Configuration File in every stage. For example, I might want to use a different configuration file in a Join Stage and use a different one in a Copy Stage. DataStage gives us that flexibility, however, for some reason, it is not enabled in my project. I'm not sure whether I've to set some environmental variable in DataStage Administrator to enable that....Can someone please help me out in this?
2. Can we write conditional statements in the Schema File? For example, I want to write a simple "If Else" statement on the basis of a certain field and I want to process the records accordingly. I know this is not a good process to do and would have a huge impact on performance if the number of records are high, however I just want to now whether we've this option in DataStage. If yes, can someone please re-direct me to the correct documentation?
Stage Level Config File & Conditional Schema
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 138
- Joined: Wed Jul 16, 2008 9:51 pm
- Location: Kolkata
Re: Stage Level Config File & Conditional Schema
In the stage level only node map constraint can be specified thus fixing the number of nodes to be used for that particular job.binay wrote:1. There is an option to set Configuration File in every stage. For example, I might want to use a different configuration file in a Join Stage and use a different one in a Copy Stage. DataStage gives us that flexibility, however, for some reason, it is not enabled in my project. I'm not sure whether I've to set some environmental variable in DataStage Administrator to enable that....Can someone please help me out in this?
APT_CONFIG can be set at server level globally for all projects or a specific configuration can be set at the project level.
As Ray pointed out, the APT_CONFIG is same for all stages in a job & also project level.
Thanks,
Tony
Specifying config file at the JOB level
Pardon me, I'm a rank wet-behind-the-ears newbie at DataStage, but I discovered the following that might be useful for this discussion. In DataStage 8.7, you can specify environment variables at the job level.
1. Make sure you are not currently editing your job.
2. Right-click on the job and click "Properties"
3. Select the "Parameters" tab.
4. Click "Add Environment Variable"
5. Scroll down and select "$APT_CONFIG_FILE". This should return you to the Job Properties screen with your environment variable on the list.
6. Double-click on the "Default Value" and change it to the Config file you want for that job.
Now whenever you go into any of the steps for that job, you should see your chosen config file.
Hope this helps...
1. Make sure you are not currently editing your job.
2. Right-click on the job and click "Properties"
3. Select the "Parameters" tab.
4. Click "Add Environment Variable"
5. Scroll down and select "$APT_CONFIG_FILE". This should return you to the Job Properties screen with your environment variable on the list.
6. Double-click on the "Default Value" and change it to the Config file you want for that job.
Now whenever you go into any of the steps for that job, you should see your chosen config file.
Hope this helps...
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard.
This is not new. You can only load environment variables as job parameters if those environment variables are defined at project level.
There may be one exception to this, if the special token $ENV is used as the default value. In this case, you are instructing DataStage to seek the value of the environment variable from the operating system shell in which the job is running.
This is not new. You can only load environment variables as job parameters if those environment variables are defined at project level.
There may be one exception to this, if the special token $ENV is used as the default value. In this case, you are instructing DataStage to seek the value of the environment variable from the operating system shell in which the job is running.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.