ELSE IF STATMENT
Moderators: chulett, rschirm, roy
ELSE IF STATMENT
HI,
MY SOURCE IS
CHANNEL_TYPE
DS
D2D
Trarget wanna be
B
C
IF DSLink59.CHANNEL_TYPE= DS THEN "B" ELSE IF DSLink59.CHANNEL_TYPE=D2D THEN "C"
THE ERROR IS RED IS THIS NOT RITE
THNXS
BOBBY
MY SOURCE IS
CHANNEL_TYPE
DS
D2D
Trarget wanna be
B
C
IF DSLink59.CHANNEL_TYPE= DS THEN "B" ELSE IF DSLink59.CHANNEL_TYPE=D2D THEN "C"
THE ERROR IS RED IS THIS NOT RITE
THNXS
BOBBY
Hi,
it is red since you need to add another else clause!
IHTH,
it is red since you need to add another else clause!
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
ok to short a post!
in your derivation you wrote an If Then Else statement it has no else if so you actually started a new If Then Else statement in the Else clause, since you left out the Else cluase of the new If Then Else statement it is red.
IHTH,
in your derivation you wrote an If Then Else statement it has no else if so you actually started a new If Then Else statement in the Else clause, since you left out the Else cluase of the new If Then Else statement it is red.
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Plan your If .. Then .. Else .. constructs, and use the Expression Editor to build them. In this way you will not be left with a dangling clause in the expression.
And, Bobby, can you please write in English? These SMS-style expressions are difficult for those participants whose first language is not English.
And, Bobby, can you please write in English? These SMS-style expressions are difficult for those participants whose first language is not English.
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,
your DS and D2D are they constants?, meaning the actual values in the column your checking?
if so you must treat them as strings, since they are strings, hence you need to enclose them in qoutes or double qoutes so put them as "DS" and "D2D"
Good Luck,
your DS and D2D are they constants?, meaning the actual values in the column your checking?
if so you must treat them as strings, since they are strings, hence you need to enclose them in qoutes or double qoutes so put them as "DS" and "D2D"
Good Luck,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Hi,
Sorry for asking, but what DS training did you go thru?
If you have none you need it ASAP, IMHO only.
Good Luck,
Sorry for asking, but what DS training did you go thru?
If you have none you need it ASAP, IMHO only.
Good Luck,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If you would use the Expression Editor to create this expression you would discover that input column names must be qualified with input link names. String constants must be quoted, as in most (all?) programming languages.
Hence for example, unless it's the name of a stage variable, D2D is meaningless to the expression parser. If they're quoted, they're character string constants; if they're qualified with an input link name, they're input columns; if they're surrounded by a pair of "#" characters they're references to job parameters.
Use the Expression Editor for all expression building. Every time you touch the keyboard you're prone to making errors. By always using the Expression Editor you also become more and more proficient in its use, and exult in the graphical interface that DataStage provides as a rapid development environment.
Work through the Tutorial supplied with DataStage.
Enrol on the DataStage classes. They're available via the Web, though I'd always advocate getting on an instructor-led class if possible.
Hence for example, unless it's the name of a stage variable, D2D is meaningless to the expression parser. If they're quoted, they're character string constants; if they're qualified with an input link name, they're input columns; if they're surrounded by a pair of "#" characters they're references to job parameters.
Use the Expression Editor for all expression building. Every time you touch the keyboard you're prone to making errors. By always using the Expression Editor you also become more and more proficient in its use, and exult in the graphical interface that DataStage provides as a rapid development environment.
Work through the Tutorial supplied with DataStage.
Enrol on the DataStage classes. They're available via the Web, though I'd always advocate getting on an instructor-led class if possible.
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.