Warning converting decimal to date

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
r.bhatia
Participant
Posts: 11
Joined: Mon Jun 30, 2008 12:45 am
Location: Manchester

Warning converting decimal to date

Post by r.bhatia »

Problem Description:
------------------------
no warnings on DS 7.5 but warnings produced on DS 7.5.3 while using the same code

Warning: APT_CombinedOperatorController,1: Conversion error calling conversion routine date_from_string data may have been lost

Transformation used to convert DECIMAL(8,0) to a date
-----------------------------------------------------------------
If IsNull(lkread_L2OE.L2OE_INS_EFF_DATE)
Then SetNull()
Else (If DateToString(StringToDate(DecimalToString(lkread_L2OE.L2OE_INS_EFF_DATE,"suppress_zero") ,"%yyyy%mm%dd"),"%yyyy%mm%dd")="********"
Then SetNull()
Else StringToDate(DecimalToString(lkread_L2OE.L2OE_INS_EFF_DATE,"suppress_zero") ,"%yyyy%mm%dd"))

The results are as expected but I am getting warnings on the job-log, please let me know how I can get rid of these warnings
Aruna Gutti
Premium Member
Premium Member
Posts: 145
Joined: Fri Sep 21, 2007 9:35 am
Location: Boston

Post by Aruna Gutti »

I am not sure whether it is a good idea or not ... but if I want to suppress a warning I will right click on the warning in the job log and select add rule to message handler option and supress it from there.
Aruna Gutti
Premium Member
Premium Member
Posts: 145
Joined: Fri Sep 21, 2007 9:35 am
Location: Boston

Post by Aruna Gutti »

I am not sure whether it is a good idea or not ... but if I want to suppress a warning I will right click on the warning in the job log and select add rule to message handler option and supress it from there.
r.bhatia
Participant
Posts: 11
Joined: Mon Jun 30, 2008 12:45 am
Location: Manchester

Post by r.bhatia »

I did right click on the warning message and added it to a message handler, after which I tried running the job again.

Still getting those warnings.

Wanted to know how to incorporate that message handler in the job/sequencer? What do i need to do for that?
rakesh bhatia
r.bhatia
Participant
Posts: 11
Joined: Mon Jun 30, 2008 12:45 am
Location: Manchester

Post by r.bhatia »

I did right click on the warning message and added it to a message handler, after which I tried running the job again.

Still getting those warnings.

Wanted to know how to incorporate that message handler in the job/sequencer? What do i need to do for that?
dhiraj
Participant
Posts: 68
Joined: Sat Dec 06, 2003 7:03 am

Post by dhiraj »

We are facing a similar issue when we upgraded from 7.5.1 to 7.5.3. recently.

There are no warnings on DS 7.5.1 but warnings produced on DS 7.5.3 while using the same code

Warning: APT_CombinedOperatorController,1: Conversion error calling conversion routine date_from_string data may have been lost

Does anybody know what causes this and the resolution apart from supressing the warning? I noticed that the warning went away when I handled the type conversion explicitly in 7.5.3. would that mean I would have to identify all instances where implicit conversion was taking place in the existing jobs and handle them appropriately?


Regards
Dhiraj
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

dhiraj wrote:I noticed that the warning went away when I handled the type conversion explicitly in 7.5.3. would that mean I would have to identify all instances where implicit conversion was taking place in the existing jobs and handle them appropriately?
Yes. They should have given you that same warning in the earlier version as well.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply