Fatal Error: Invalid Julian day

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
satish.raghavan
Participant
Posts: 22
Joined: Tue Jul 21, 2009 4:45 am
Location: Chennai
Contact:

Fatal Error: Invalid Julian day

Post by satish.raghavan »

Hi all,

i have a job where the data is extracted from four sequential file undergoing joins and then the data is transformed and loaded into the Target.

In the transformer stage the following operations are done:

STAGE VAR:NEWCHABIM
If (IsNull(Ln_To_TRF.CHABIM) Or Trim(Ln_To_TRF.CHABIM, " ", "A") = '' Or Ln_To_TRF.CHABIM = "0") Then '2050-12-31' Else StringToDate(Ln_To_TRF.CHABIM,"%yyyy%mm%dd")


STAGE VAR:NEWOUVOR
If (IsNull(Ln_To_TRF.OUVOR) Or Trim(Ln_To_TRF.OUVOR, " ", "A") = '' Or Ln_To_TRF.OUVOR = "0") Then '2050-12-31' Else StringToDate(Ln_To_TRF.OUVOR,"%yyyy%mm%dd")


TARGET VARIABLE:DIFFERENCE
If (NEWCHABIM = '2050-12-31' Or NEWOUVOR = '2050-12-31') Then SetNull() Else Abs(JulianDayFromDate(NEWCHABIM) - JulianDayFromDate(NEWOUVOR))


When i run the job it is showing the error as
->Fatal Error: Invalid Julian day.
->Failure during execution of operator logic.
->The Section Leader on node node2 has terminated unexpectedly.

though it is showing job aborted in the director, the job is running and the data is loading into the target.

can anyone give me a solution to remove this error.
Thanks & regards

Satish R
nani0907
Participant
Posts: 155
Joined: Wed Apr 18, 2007 10:30 am

Post by nani0907 »

hello,

convert in correct format .You have ''2050-12-31' .but while conveting it into StringToDate(Ln_To_TRF.CHABIM,"%yyyy%mm%dd") .It should bas as StringToDate(Ln_To_TRF.CHABIM,"%yyyy-%mm-%dd") .

Check format correctly
thanks n regards
nani
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What is your target? And you haven't shown us what your input data actually looks like.
-craig

"You can never have too many knives" -- Logan Nine Fingers
satish.raghavan
Participant
Posts: 22
Joined: Tue Jul 21, 2009 4:45 am
Location: Chennai
Contact:

Post by satish.raghavan »

The input data is extracted as VARCHAR8 in the format 'YYYYMMDD' and then transformed and loaded into the target DATABASE TABLE as the DIFFERENCE of DAYS between the two DATES Z_OUVOUR and Z_CHABIM.

thanks and Regards,:)
Thanks & regards

Satish R
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

What datatype is "NEWCHABIM" - if you look at your code your are treating it as a string in the THEN clause, but as a date in the ELSE clause.
satish.raghavan
Participant
Posts: 22
Joined: Tue Jul 21, 2009 4:45 am
Location: Chennai
Contact:

Post by satish.raghavan »

i hd tried converting it using string to date function for the variables NEWCHABOM AND OUVOR.

Now its working fine.

Thanks Arndw
Thanks & regards

Satish R
Post Reply