switch stage
Moderators: chulett, rschirm, roy
switch stage
Hi,
I am using the switch stage in my job.when i give values in case statemnets as character it is aborting and giving the error as "A value was not specified as a case option"
example:-
selector ENAME
case 'SMITH'
case 'MILLER'.
If i select the selector as EMPNO and numbers in case statment,it is working fine.
Does switch not supports the characters in case statment?
Please reply me why i am getting this error?
I am using the switch stage in my job.when i give values in case statemnets as character it is aborting and giving the error as "A value was not specified as a case option"
example:-
selector ENAME
case 'SMITH'
case 'MILLER'.
If i select the selector as EMPNO and numbers in case statment,it is working fine.
Does switch not supports the characters in case statment?
Please reply me why i am getting this error?
VASU..
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
That error suggests that there's a value in your data for which you have not coded. Try adding an "otherwise" case. Are you directing particular values to particular output channels?
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.
Hi Ray,ray.wurlod wrote:That error suggests that there's a value in your data for which you have not coded. Try adding an "otherwise" case. Are you directing particular values to particular output channels? ...
I am routing output to the proper output link as well.
ex:-
case = 'SMITH' =0
case ='JONES' =1
case = default =2
Still i am getting the same error as A value was not specified as a case option.
Please adivice me to rectify this error.
VASU..
-
- Premium Member
- Posts: 120
- Joined: Thu Oct 28, 2004 4:24 pm
-
- Premium Member
- Posts: 120
- Joined: Thu Oct 28, 2004 4:24 pm
Also I would stay with the switch in stead of the transformer. The transformer is the easy way out but the most costly in terms of performance.
Also you might try the option if not found set it to output and attach a reject file
Also you might try the option if not found set it to output and attach a reject file
"Don't let the bull between you and the fence"
Thanks
Gregg J Knight
"Never Never Never Quit"
Winston Churchill
Thanks
Gregg J Knight
"Never Never Never Quit"
Winston Churchill
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I don't believe that's true any more. But I have no empirical results either way.greggknight wrote:The transformer is the easy way out but the most costly in terms of performance.
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.
-
- Premium Member
- Posts: 87
- Joined: Mon Feb 18, 2008 3:58 pm
- Location: Sacramento, CA
According to IBM's training materials for Advanced DataStage Training (DX445), page 322: "Transformer constraints are FASTER than the Filter or Switch stages. Filter and Switch expressions are interpreted at runtime, Transformer constraints are compiled."The transformer is the easy way out but the most costly in terms of performance.