type conversion problem in transformer

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
bobbysridhar
Premium Member
Premium Member
Posts: 41
Joined: Sun Mar 09, 2008 8:12 pm

type conversion problem in transformer

Post by bobbysridhar »

Hi,
I am trying to compare current timestamp with effective date(which is timestamp) in the if statement in transformer stage. when i try to compile the job it is giving the following error:

'Invalid conversion requested from a timestamp to a int64.'

Could somebody help me in fixing this
k.v.sreedhar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Show us what you are doing, the syntax you are using and the data types involved.
-craig

"You can never have too many knives" -- Logan Nine Fingers
bobbysridhar
Premium Member
Premium Member
Posts: 41
Joined: Sun Mar 09, 2008 8:12 pm

Post by bobbysridhar »

IF(DSLink326.POLICYSTATUSCD='cancelled') then (if(abc< DSLink326.EFFECTIVE) THEN 'inForcePending' ELSE IF(abc>= DSLink326.EFFECTIVE) THEN 'inForce' ELSE '') ELSE IF(DSLink326.POLICYSTATUSCD='issued') THEN (IF(DSLink326.CANCELNOTICEIND=1) THEN 'cancelPending' ELSE IF((DSLink326.CANCELNOTICEIND<>1) AND (abc>= DSLink326.EXPIRATION)) THEN 'expired' ELSE IF((DSLink326.CANCELNOTICEIND<>1) AND (DSLink326.EFFECTIVE<= abc<= DSLink326.EXPIRATION)) THEN 'inForce' ELSE IF((DSLink326.CANCELNOTICEIND<>1) AND (abc> DSLink326.EFFECTIVE)) THEN 'inForcePending' ELSE 'issued') ELSE IF(DSLink326.POLICYSTATUSCD='bound') THEN 'bound' ELSE IF(DSLink326.POLICYSTATUSCD='companyDeclined') THEN 'companyDeclined' ELSE IF(DSLink326.POLICYSTATUSCD='customerDeclined') THEN 'customerDeclined' ELSE IF(DSLink326.POLICYSTATUSCD='dataGather') THEN 'dataGather' ELSE IF(DSLink326.POLICYSTATUSCD='proposed' )THEN 'proposed' ELSE IF(DSLink326.POLICYSTATUSCD='rated') THEN 'rated' ELSE ''
k.v.sreedhar
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Make sure the abc data type is also timestamp.
Choose a job you love, and you will never have to work a day in your life. - Confucius
Post Reply