Page 1 of 1

Switch Stage

Posted: Thu Jan 22, 2009 12:20 am
by saugat_1982
Hi

I am using SWITCH stage in a job , and there are 3 cases are there .but when I m passing "user-defined Mapping" in "Case" I am passing case as
case="R1"=0,"R2"=1,"IG"=2 , I am getting thefollowing error .
SW_CIDN: Parse error on case string: "R1"= 0,"R2"= 1,"IG"= 2;
multiple `=' tokens were seen.

Please help to rectify this error

Posted: Thu Jan 22, 2009 12:38 am
by miwinter
Can I assume you have specified these as separate cases? If not, please review how the Switch stage should be used. That's to say, specifically, that the case statements should be defined individually, not all as one case separated by commas, as your post suggests you have done.

Switch case

Posted: Thu Jan 22, 2009 12:41 am
by saugat_1982
yes
in C-Programing it shld be like this

swicth(RELEASE)
CASE R1: pass to output dataset 0
CASE R2: pass to output dataset 1
.........


So can you please suggest , I am doing right or not?

Posted: Thu Jan 22, 2009 12:44 am
by miwinter
It should not be case="R1"=0,"R2"=1,"IG"=2

it should be:

Case="R1"=0
Case="R2"=1
Case="IG"=2

Switch

Posted: Thu Jan 22, 2009 12:48 am
by saugat_1982
But Pdf file explains the way I ve don e,
Can you please explain bit

Thanks .
Saugat

Posted: Thu Jan 22, 2009 12:55 am
by miwinter
Not much more than I already have...

Here's my final attempt, calling on hard evidence :D

Case
Specifies user-defined mapping between actual values of the selector column and an output link. Mapping is a string of the form: Selector Value[ = Output Link Label Number], The Link Label Number is not needed if the value is intended for the same output link as specified by the previous mapping that specified a number. You must specify an individual mapping for each value of the selector column you want to direct to one of the output links, thus this property will be repeated as many times as necessary to specify the complete mapping.

Posted: Thu Jan 22, 2009 12:58 am
by saugat_1982
Thanks

Posted: Thu Jan 22, 2009 1:00 am
by miwinter
Mon plaisir :)