DataStage Job - Error in compiling job at transformer stage
Posted: Wed Mar 21, 2007 11:39 pm
Hi ,
The datastage job in figure shows compile time error at the transformer stage.
http://img444.imageshack.us/my.php?image=dsjobvc4.jpg
As in figure I have an input column cms_p11d.orderno which I map to two columns in the output table. One mapping of the input column is used with an if statement.
if cms_p11d.ORDERNO like 'R%' then 'Reallocation Order' else if cms_p11d.ORDERNO like 'S%' then 'STH Car Order' else if cms_p11d.ORDERNO like '0%' then 'New Car Order' else if cms_p11d.ORDERNO like '1%' then 'New Car Order' else if cms_p11d.ORDERNO like '2%' then 'New Car Order' else if cms_p11d.ORDERNO like '3%' then 'New Car Order' else if cms_p11d.ORDERNO like '4%' then 'New Car Order' else if cms_p11d.ORDERNO like '5%' then 'New Car Order' else if cms_p11d.ORDERNO like '6%' then 'New Car Order' else if cms_p11d.ORDERNO like '7%' then 'New Car Order' else if cms_p11d.ORDERNO like '8%' then 'New Car Order' else if cms_p11d.ORDERNO like '9%' then 'New Car Order' else 'Gap Car Order'
Removing the 'If' statement (as in figure below) allows me to compile and run the job. But its essential that I have the 'If' statement.
http://img183.imageshack.us/my.php?image=dsjob2mx6.jpg
Please suggest an alternative.
Thanks
Athira
The datastage job in figure shows compile time error at the transformer stage.
http://img444.imageshack.us/my.php?image=dsjobvc4.jpg
As in figure I have an input column cms_p11d.orderno which I map to two columns in the output table. One mapping of the input column is used with an if statement.
if cms_p11d.ORDERNO like 'R%' then 'Reallocation Order' else if cms_p11d.ORDERNO like 'S%' then 'STH Car Order' else if cms_p11d.ORDERNO like '0%' then 'New Car Order' else if cms_p11d.ORDERNO like '1%' then 'New Car Order' else if cms_p11d.ORDERNO like '2%' then 'New Car Order' else if cms_p11d.ORDERNO like '3%' then 'New Car Order' else if cms_p11d.ORDERNO like '4%' then 'New Car Order' else if cms_p11d.ORDERNO like '5%' then 'New Car Order' else if cms_p11d.ORDERNO like '6%' then 'New Car Order' else if cms_p11d.ORDERNO like '7%' then 'New Car Order' else if cms_p11d.ORDERNO like '8%' then 'New Car Order' else if cms_p11d.ORDERNO like '9%' then 'New Car Order' else 'Gap Car Order'
Removing the 'If' statement (as in figure below) allows me to compile and run the job. But its essential that I have the 'If' statement.
http://img183.imageshack.us/my.php?image=dsjob2mx6.jpg
Please suggest an alternative.
Thanks
Athira