Transformer Compilation issue on unhandled Nulls

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
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Transformer Compilation issue on unhandled Nulls

Post 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
- Zulfi
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Care to share the actual error?
-craig

"You can never have too many knives" -- Logan Nine Fingers
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post 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.
- Zulfi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Pretty sure that was 8.5 but someone else would have to confirm. Or deny.
-craig

"You can never have too many knives" -- Logan Nine Fingers
srinivas.nettalam
Participant
Posts: 134
Joined: Tue Jun 15, 2010 2:10 am
Location: Bangalore

Post by srinivas.nettalam »

Null tolerant stage variables were introduced in v8.5
N.Srinivas
India.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Or was it 8.5 FP1 ?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply