Problems with Datastage - Date format & Null Handling of a Date field in a schema file

Hi,

I have a .csv file as my source.I am reading the data using a
sequential file stage.

Then I am validating the format of the data using a schema file.

The date format of the incoming file is '%dd/%mm/%yyyy'.So the date
column has a fixed length 10.

Now according to the provided incoming data set the date column should
be nullable.

Can anybody please provide an idea how to handle a nullable date
column using a schema file in Datastage?

Questions by moumitamitra

Showing Answers 1 - 6 of 6 Answers

Abhijain

  • Oct 19th, 2009
 

Read date field from sequential file as varchar datatype with nullable yes. Use modify stage or transformer to convert the datatype and also check the nullability of the incoming data and if null found assign some default value like '12-Dec-9999' and process.

At the time of loading convert the date '12-Dec-9999' to NULL again.

Abhijain

  • Oct 19th, 2009
 

Read the date field column as varchar and use transformer to check nullabiltiy and if null found assign some default value say '12-Dec-9999' and use the appropriate conversion function and process.

At the time of loading, check the date field and if it is '12-Dec-9999' populate NULL else load the field.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions