Error in 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
major
Premium Member
Premium Member
Posts: 167
Joined: Mon Nov 26, 2007 12:21 am

Error in Switch stage

Post by major »

Hi,

I'm using Switch stage to populate 3 output files
I have selected User defined Mapping and put the below in Case block

Case="21"=0
Case="22"=0
Case="23"=0
Case="24"=0
Case="12"=1
Case="13"=1
Case="14"=1
Case="16"=1
Case="17"=1
Case="98"=2

I'm getting below error

Switch_25: Error occurred during initializeFromArgs()
Switch_25: Parse error on case string: Case="21"=0
Case="22"=0
Case="23"=0
Case="24"=0
Case="12"=1
Case="13"=1
Case="14"=1
Case="16"=1
Case="17"=1
Case="98"=2;
multiple `=' tokens were seen.
main_program: Creation of a step finished with status = FAILED.


Please help.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

You should only enter the selector value and optionally the output link when mapping cases, as shown in the Information section of the stage editor:

<Selector Value>[=<Output Link Label Number>]

Example: "21"=0

Don't use the "multiple line editor" option. Enter one case at a time, adding them individually.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
major
Premium Member
Premium Member
Posts: 167
Joined: Mon Nov 26, 2007 12:21 am

Post by major »

Now I'm not using single line selector
Still it shows the same error

Switch_25: Parse error on case string: "21"=0 "22"=0 "23"=0 "24"=0 "12"=1 "13"=1 "14"=1 "16"=1 "17"=1 "98"=2;
multiple `=' tokens were seen.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

To repeat: Enter one case at a time, adding them individually.

"21"=0
"22"=0

Each condition is separate. You CANNOT combine them.

<a href="http://publib.boulder.ibm.com/infocente ... l">Example in the Parallel Job Developer's Guide</a>

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
Post Reply