Page 1 of 1

Posted: Sat Apr 26, 2008 12:27 am
by kumar_s
It should work. What is the error / warning you getting?
Try to excape all the ' charachter with /.
Shouldn't you be having ' before the sting as well??

Posted: Mon Apr 28, 2008 6:57 am
by OddJob
I had exactly the same issue. It seems the DB2 stage likes to strip the quote character - naughty, naughty. I resolved it as follows:

Parameter value did not include the single quotes e.g.
Param=One,Two,Three

My job was being called from a sequence. In the parameter value expression I used the following:
"\'":Ereplace (Param, ",", "\',\'"):"\'"

It looks a bit confusing because of the mixture of double and single quotes, but essentially it is replacing each ,<comma> with ','<single quote><comma><single quote> and prefixing/suffixing with '<single quote>

If you only have a single job you may have to wrap it with a sequence to allow this kind of parameter pre-processing.

Hope this helps.

Posted: Mon Apr 28, 2008 1:26 pm
by rony_daniel
Thank you very much OddJob. Your solution worked for me.

But later I found that I got messed up because the $PROJDEF variable assigning the default value which was wrong.

In my case the starting and ending single quotes are given in the query itself as you can see

select name, id from emp where name in ( ' #name_param# ' )
so only the rest of the single quotes needs to be taken care. Now I find that my original job itself works without wrapping it in a sequencer.

Thanks once again.