Note that you only need one blank for the constant in the WHEN condition.
If you actually have WHEN=(...) rather than WHEN(...), then without seeing the actual syntax error you received, I can take an educated guess that it was for IFTHEN and the reason is that you have the April, 2006 DFSORT PTF installed on your test system but not on your production system.
You need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use DFSORT's IFTHEN and OVERLAY functions. Ask your System Programmer to install it on the production system. For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see: