combined explicit conversions in a single specification

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
madsongtel
Participant
Posts: 31
Joined: Fri Aug 01, 2008 2:56 am

combined explicit conversions in a single specification

Post 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.
madsongtel
Participant
Posts: 31
Joined: Fri Aug 01, 2008 2:56 am

Post 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.
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

i think multiple instances of a single job help you.
pandeeswaran
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post 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,
- james wiles


All generalizations are false, including this one - Mark Twain.
Post Reply