Unable to trace the warnings illegal date/time value

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
rajiivnb
Participant
Posts: 77
Joined: Fri Sep 10, 2004 8:38 am
Location: India

Unable to trace the warnings illegal date/time value

Post by rajiivnb »

Hi,
SQLSTATE=22008, DBMS.CODE=0
[DataStage][SQL Client]Illegal date/time value



This is the warnings in my job.Any resolutions on this warning.????

Regards,
Rajiivnb
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You have provided data to a column marked as Date or Time or TimeStamp. The ODBC driver (or the BASIC SQL Client Interface, if your target is a UniVerse table or DataStage table) has detected that the data do not, in fact, match the required format.

Send your output to a text file to verify that this is the case.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rajiivnb
Participant
Posts: 77
Joined: Fri Sep 10, 2004 8:38 am
Location: India

Post by rajiivnb »

Hi ray,
I understood the problem .When ever i call a @date function for todayz date it tells me the problem as date/time illegal.And my routine which i call is also taking @date as the input arg.what should i do to avoid this problem in using @date?

Thanks in advance.

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

Post by chulett »

You need to let us know what database you are having the issue with, what stage you are using (seems like ODBC) and how the field is defined both in your database and your job. Then people will be able to give you some specific help.

Bascially, you are going to need to take the output of @DATE and get it into the approriate format for your target field using some combination of Oconv and/or Iconv.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The way that dates are handled is inconsistent between stage types, so you need to learn what your particular stage type expects. Some expect internal DataStage format, others expect some definite picture/format to be supplied.

Once you've learned the rules by which your stage type plays, you can also play by those rules, and all is joyful.

However, some databases allow the date picture to be configured, for example via an environment variable, so that is something else of which you may need to be aware. Of course, that piece is outside of DataStage control, and may break jobs if changed.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rajiivnb
Participant
Posts: 77
Joined: Fri Sep 10, 2004 8:38 am
Location: India

Post by rajiivnb »

Hi,
My routine is working fine with the manager test by giving the @date but the same when i call them in designer gives me the date/time illegal values.Well i m using 7.1 and informix database with unix platform.I still have this warning thrown.And a specific column is date type but when i try passing the timestamp field gives me again a warning is there any internal conversion which converts my timestamp field to date.

Regards,
Rajiivnb
Post Reply