Switch Stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
saugat_1982
Participant
Posts: 29
Joined: Mon Nov 20, 2006 7:17 am
Location: Melbourne

Switch Stage

Post 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
Saugat Dey
miwinter
Participant
Posts: 396
Joined: Thu Jun 22, 2006 7:00 am
Location: England, UK

Post 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.
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
saugat_1982
Participant
Posts: 29
Joined: Mon Nov 20, 2006 7:17 am
Location: Melbourne

Switch case

Post 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?
Saugat Dey
miwinter
Participant
Posts: 396
Joined: Thu Jun 22, 2006 7:00 am
Location: England, UK

Post 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
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
saugat_1982
Participant
Posts: 29
Joined: Mon Nov 20, 2006 7:17 am
Location: Melbourne

Switch

Post by saugat_1982 »

But Pdf file explains the way I ve don e,
Can you please explain bit

Thanks .
Saugat
Saugat Dey
miwinter
Participant
Posts: 396
Joined: Thu Jun 22, 2006 7:00 am
Location: England, UK

Post 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.
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
saugat_1982
Participant
Posts: 29
Joined: Mon Nov 20, 2006 7:17 am
Location: Melbourne

Post by saugat_1982 »

Thanks
Saugat Dey
miwinter
Participant
Posts: 396
Joined: Thu Jun 22, 2006 7:00 am
Location: England, UK

Post by miwinter »

Mon plaisir :)
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
Post Reply