Date fields From XML to a sequential file......

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
pavans
Participant
Posts: 116
Joined: Sun Sep 10, 2006 7:33 am
Location: bangalore, india

Date fields From XML to a sequential file......

Post by pavans »

Hi
Source: XML FIle
Target :Sequential File
Processing Stage: Transformer.
I have date fields in the below format.
These fields are not getting populated into the sequential file.
The job is runnning fine.
Let me know,
do i need to use any date conversion here.
datatype is date from source and target.

ReqCancelDate="03/05/2008" ReqDeliveryDate="03/20/2008"
Thanks,
Pavan
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

If it's that simple a job, check your xpath.... (Description property on the noted columns in the output link of your XMLInput Stage).....

One guess is that the columns simply aren't in the link... (could be that they weren't in the referenced XML instance doc that you used for meta data import).

Also could be that there is a spelling error. hard to tell without seeing it here...but you should have something like a column called ReqDeliveryDate with Description propety of:

/<your higher level element(s)/<immediate higher element>/@ReqDeliveryDate

Make the datatype varchar.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

eostic wrote:Make the datatype varchar.
I would think that this is the key piece of advice here.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pavans
Participant
Posts: 116
Joined: Sun Sep 10, 2006 7:33 am
Location: bangalore, india

Post by pavans »

eostic wrote:If it's that simple a job, check your xpath.... (Description property on the noted columns in the output link of your XMLInput Stage).....

One guess is that the columns simply aren't in the link... (could be that they weren't in the referenced XML instance doc that you used for meta data import).

Also could be that there is a spelling error. hard to tell without seeing it here...but you should have something like a column called ReqDeliveryDate with Description propety of:

/<your higher level element(s)/<immediate higher element>/@ReqDeliveryDate

Make the datatype varchar.

Ernie


It worked..........now.
I have the datatype for the date fields in Transformer as Varchar.

Thanks a lot....
Thanks,
Pavan
Post Reply