Page 1 of 1

combined explicit conversions in a single specification

Posted: Sat Jul 02, 2011 8:18 am
by madsongtel
HI All,

My requirement is like, fixed length sequential file is source, i am reading as char datatype for all columns. TRAN_DATE is the column in that, i have to load in target table as date datatype.
For some of the recordsit is coming as spaces.
i am using modify stage to convert string to date and if space comes then i have to load as null. for that below is the specification i am using, but it is throwing error.
Job is RCP enables.
Source record coming as 20110203.

TRAN_DATE:date = handle_null(date_from_string[%yyyy%mm%dd](TRAN_DATE),'')

Please let me know how to do this in one specification.

Thanks in Advance.

Posted: Sat Jul 02, 2011 10:40 am
by madsongtel
i have Date fields in 100 files, If it is possible then i can do in one job, otherwise i have to create 100 different jobs to lado data into DB2 tables.

Appreciate your help.

Posted: Sun Jul 03, 2011 9:20 am
by pandeesh
i think multiple instances of a single job help you.

Posted: Mon Jul 04, 2011 11:07 pm
by jwiles
Posting the error you receive would be useful.

Modify will not let you nest the conversions. You will need two different modify stages to perform this conversion.

Using the column importer stage and schema files may actually be a better solution for null handling such as this, where you can define what values constitute a null value for an incoming data column.

Regards,