Date conversion using Modify

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
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Date conversion using Modify

Post by elavenil »

Trying to convert string into a date and the job got aborted with the error message as "Error parsing modify adapter: Error in binding: Expected source field selector; got: "2007"
Expected destination field selector, got: ")"; input:"


The code that was applied in the modify stage is as below.

BIZDATE:DATE = date_from_string (#BISDATE#) [%yyyy-%mm-%dd]

Please help me by sharing your ideas.

Thanks
Elavenil
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

Specification should be:

Code: Select all

BIZDATE:DATE = date_from_string [%yyyy-%mm-%dd] (#BISDATE#) 
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post by elavenil »

Thanks for your response.

Already tried this and it did not work and the error message was the same.

Regards
Elavenil
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

Hmm is the jop parameter playing the villan? Pass BISDATE from a previous stage try.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The argument to a Modify stage specification must be the name of an input column - you can not use job parameters here. Create the column upstream of the Modify stage - perhaps using a Column Generator stage.

Note that it is the date format string that is in square brackets - the input column name is in parentheses.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post by elavenil »

Thank you all for your responses.

Yes. The conversion did not work when parameter is used in the conversion in the modify stage.

Parameter was used in the previous stage to create a column and that column was used in the modify stage and it works.

I will mark this problem as resolved.

Regards
Elavenil
Post Reply