Data string does not match format error???

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
Cheintze
Participant
Posts: 5
Joined: Thu Feb 17, 2011 6:44 am

Data string does not match format error???

Post by Cheintze »

Hi guys,

New to the forum and only been working with datastage for a couple of months, and unfortunately, our IBM contract time is up. Trying to make a few changes to jobs and have run into the below error message.

Message:
Xfm,1: Data string '20101015' does not match format '%yyyy-%mm-%dd': an integer was expected to match tag %dd.

I don't understand why this could be occuring...as 15 is an integer. There are 8 date fields in the job - and each record contains at least a few dates. The job completes successfully, however all records are being rejected so none are loading into DB2 for this table. I've checked DB2 and the dates are defined as dates. Other similar jobs are working fine.

Any help would be appreciated.

Thanks,
Clay
Clay Heintze
IT-MC
La. Dept of Corrs.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

"%yyyy-%mm-%dd" does not match 20101015. You need to get that right first.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Tejas Pujari
Participant
Posts: 14
Joined: Thu Jul 10, 2008 7:37 am
Location: mumbai

Post by Tejas Pujari »

you will need two '-' in the source date format. it does not have '-'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Or none in the format string. They have to match.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

In other words, the mask much match the incoming data so it knows how to parse it, not what you think the output should be.
-craig

"You can never have too many knives" -- Logan Nine Fingers
blewip
Participant
Posts: 81
Joined: Wed Nov 10, 2004 10:55 am
Location: London

Post by blewip »

Had a problem with this once.

StringToTimestamp('20100101',"%yyyy%mm%dd") Does not work, although I think it should

StringToTimestamp('20100101',"%yyyymmdd") Works
Modern Life is Rubbish - Blur
Post Reply