Page 1 of 1

Transformer Compilation issue on unhandled Nulls

Posted: Thu May 23, 2013 9:16 am
by zulfi123786
Hi

This is on V 8.5

The below derivation throws compilation error

Code: Select all

If svrEarlyStartNullInd=0 AND (MidnightSecondsFromTime(TimestampToTime(LkOutTo_LkUp_Loc.TGT_WRKD_ST_TIME)) < MidnightSecondsFromTime(TimestampToTime(LkOutTo_LkUp_Loc.TGT_MIN_SHFT_ST_TI)))
Then 'Early Start'  Else 'T'
However the below compiles fine

Code: Select all

If IsNull(LkOutTo_LkUp_Loc.TGT_WRKD_ST_TIME) OR ISNull(LkOutTo_LkUp_Loc.TGT_MIN_SHFT_ST_TI) Then 'R' Else If (MidnightSecondsFromTime(TimestampToTime(LkOutTo_LkUp_Loc.TGT_WRKD_ST_TIME)) < MidnightSecondsFromTime(TimestampToTime(LkOutTo_LkUp_Loc.TGT_MIN_SHFT_ST_TI)))
Then 'Early Start'  Else 'T'
I have performed Null Handling in the stage variable and would like to use the first derivation , Not sure why the compilation Error

Posted: Thu May 23, 2013 9:30 am
by chulett
Care to share the actual error?

Posted: Thu May 23, 2013 9:51 am
by zulfi123786
The error is just pointing to the compiled code.

Code: Select all

##W IIS-DSEE-TBLD-00000 10:04:31(009) <main_program> Error when checking composite operator: Output from subprocess: "/projects/ETL/PSA/RT_BP3232.O/V134S22_TEST3_Trans_EXC_DESC.C", line 714.147: 1540-0063 (S) The text ";" is unexpected.

Posted: Thu May 23, 2013 4:30 pm
by ray.wurlod
I can't recall whether it was 8.5 or 8.7 that introduced null-tolerant stage variables. If it was 8.7 then this is the underlying cause of your misery, and why the second formulation works.

Posted: Thu May 23, 2013 9:19 pm
by chulett
Pretty sure that was 8.5 but someone else would have to confirm. Or deny.

Posted: Mon May 27, 2013 2:18 pm
by srinivas.nettalam
Null tolerant stage variables were introduced in v8.5

Posted: Mon May 27, 2013 4:38 pm
by ray.wurlod
Or was it 8.5 FP1 ?