Problem with seperator in timestamp field

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
jaysheel
Participant
Posts: 57
Joined: Mon Apr 07, 2008 1:54 am
Location: Bangalore

Problem with seperator in timestamp field

Post by jaysheel »

Hi,

I am running with a problem where I am reading a flat file with Seq file stage.
I have a timestamp field with value 11/30/2012.22.05 without seconds values.
I have set the format string in the column definition as "%mm/%dd/%yyyy.%hh.%nn" and reading the field as timestamp.

The values are getting read properly and getting converted to a timestamp value as 2012-11-30 22:05:00

But I just ran the job with value 11a30/2012x22.05 - This should be rejected according to me. But still it passed and the timestamp value remained as mentioned above. :shock:

I think Datastage accepting any ASCII character in place of '/' and '.' Anyone who has knowledge on this please spread somelight. I have spent a whole day figuring out how to get it rejected :( Even I went through Orchestrate Manual to understand the Datastage's Time and Date formats. No Use !
- Jaysheel -
elsont
Participant
Posts: 16
Joined: Wed Oct 08, 2008 1:20 am
Location: Chicago

Re: Problem with seperator in timestamp field

Post by elsont »

DataStage won't validate delimiters in the time/date/timestamp fields automatically. If you want to validate it then read it as string and write code to validate in transformer then reject/convert to timestamp accordingly.
jaysheel
Participant
Posts: 57
Joined: Mon Apr 07, 2008 1:54 am
Location: Bangalore

Post by jaysheel »

This was solved by manually validating the delimiters. But this is surely a bug in datastage which IBM needs to handle. An alphabet or a special character cannot be accpted in place of a "/" delimiter which is the part of a datastage function.


Solution :

If Col[3,1]<>"/" Or Col[6,1]<>"/" Then 1 else 0 -> SV
- Jaysheel -
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Did you report this to your official support provider? Find out what the official answer is?
-craig

"You can never have too many knives" -- Logan Nine Fingers
jaysheel
Participant
Posts: 57
Joined: Mon Apr 07, 2008 1:54 am
Location: Bangalore

Post by jaysheel »

I need to create a ticket for reporting this to the official support provider. They will be taking this up with IBM. I am doing it right now.
- Jaysheel -
Post Reply