Date Warning from DB2 Extract,Load to Cobol file (complex)

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
ds2000
Premium Member
Premium Member
Posts: 109
Joined: Sun Apr 22, 2007 7:25 pm
Location: ny

Date Warning from DB2 Extract,Load to Cobol file (complex)

Post by ds2000 »

I have a db2 table of around 400+ columns and it has around 9 million rows. Extracting from this table doing some transformation and loading to a .cob file. After loading few million rows it gave me the following error and then job was aborted because i have routine that aborts if warning comes up.
Then i did query on Field 15 but there is no Date value that is later than 9999-12-31 or earlier than 0001-01-03 in the table.

Following is warning msg:

Warning:
db2Mytable,0: Invalid date value in setOutputFieldAsDate() for field '15' in output dataset '0'.
Date cannot be later than 9999-12-31 or earlier than 0001-01-03.
Julian days value = 1721424.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

What type is the column defined as in DB2? I wonder where you are doing the Julian date conversion.
ds2000
Premium Member
Premium Member
Posts: 109
Joined: Sun Apr 22, 2007 7:25 pm
Location: ny

Post by ds2000 »

its db2 date type.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I'm not sure if the "field 15" is conted starting at 1 or 0 - are both of those columns dates, and if so could you check the range? I still don't understand how or where the Julian Date figures into this.
ds2000
Premium Member
Premium Member
Posts: 109
Joined: Sun Apr 22, 2007 7:25 pm
Location: ny

Post by ds2000 »

I checked columns 15, 16 and colum 15 and 16 is db2 date type width 10. Im running query for column 16 for any date that is not in the range.
ds2000
Premium Member
Premium Member
Posts: 109
Joined: Sun Apr 22, 2007 7:25 pm
Location: ny

Post by ds2000 »

Arnd,
So when i checked column 16 it had 2 rows with 1000-01-01 date. It means column counting starts from 0. That column was notnullable so db2 put that default date in it.

However i figured out the problem and fixed the rows. Thanks.
Post Reply