Date Format in Parallel job

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

pravin1581
Premium Member
Premium Member
Posts: 497
Joined: Sun Dec 17, 2006 11:52 pm
Location: Kolkata
Contact:

Date Format in Parallel job

Post by pravin1581 »

Hi All,

There is a date field in the file with data type defined as date and the value as mm/dd/yyyy. The Sequential file stage is unable to read the file.
There is a option of changing the format from default to the one present in the file , the default format is yyyy-mm-dd. Please help me out , how to read the date field in parallel job.

Thanx in advance.
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

Did you try changing the format string under date category in format tab of the sequential file to mm/dd/yyyy?
pravin1581
Premium Member
Premium Member
Posts: 497
Joined: Sun Dec 17, 2006 11:52 pm
Location: Kolkata
Contact:

Post by pravin1581 »

balajisr wrote:Did you try changing the format string under date category in format tab of the sequential file to mm/dd/yyyy?
Yes the format was changed to mm/dd/yyyy from default , but we are not able to read any data.
gbusson
Participant
Posts: 98
Joined: Fri Oct 07, 2005 2:50 am
Location: France
Contact:

Post by gbusson »

what is the warning message in your log?
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

In the Edit column metadata dialog box for the column did you specify any other date format?
Also, post sample data and error which you received.
pravin1581
Premium Member
Premium Member
Posts: 497
Joined: Sun Dec 17, 2006 11:52 pm
Location: Kolkata
Contact:

Post by pravin1581 »

gbusson wrote:what is the warning message in your log?
The data in the file is 02/12/2007 and the data type is Date. The filed delimiter is comma . The error that we are getting is :

Parameter specified but not used in flow: DSProjectMapName
##W TOIX 000000 05:28:08(000) <Sequential_File_1,0> Field "Date" delimiter not seen, at offset: 12
##W TOIX 000154 05:28:08(001) <Sequential_File_1,0> Import warning at record 0.
##W TOIX 000018 05:28:08(002) <Sequential_File_1,0> Import unsuccessful at record 0.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Does your format string include percent signs and delimiters ("%mm/%dd/%yyyy")? Where have you set the format string?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Who created this file? Is it some external process or DataStage? And if datastage did, then did a server job create it or a px job?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
AaronVG
Participant
Posts: 13
Joined: Thu Feb 15, 2007 4:02 pm

Re: Date Format in Parallel job

Post by AaronVG »

I have had a similar delimiter problem when I failed to check my input CSV that I received from a coworker. About halfway through the file, the comma that should have separated the 3rd column from the 4th column (4th being nullable and last column) disappeared.

a,b,c,d <- ok
e,f,g, <- ok
...
w,x,y <- not ok

Nothing was wrong in my code, but the source file was created manually from multiple sources and errors resulted.

Also, it bears repeating, have you changed your format to
ray.wurlod wrote: "%mm/%dd/%yyyy" ?
<<<>>>
My opinions are just that.
pravin1581
Premium Member
Premium Member
Posts: 497
Joined: Sun Dec 17, 2006 11:52 pm
Location: Kolkata
Contact:

Post by pravin1581 »

ray.wurlod wrote:Does your format string include percent signs and delimiters ("%mm/%dd/%yyyy")? Where have you set the format string?
The format string includes the percent signs and the format is set in the format properties of the date filed of the sequential stage in the job.
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

Can you post your first 5 rows of your file?

Did you check whether you had assigned any other date format to the column alone?
pravin1581
Premium Member
Premium Member
Posts: 497
Joined: Sun Dec 17, 2006 11:52 pm
Location: Kolkata
Contact:

Post by pravin1581 »

balajisr wrote:Can you post your first 5 rows of your file?

Did you check whether you had assigned any other date format to the column alone?
The Date fields are like 02/12/2007, 02/13/2007, 02/13/2007 and henceforth. The column defn has date as the datatype.
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

I had asked for complete row and not date column alone.

Also, i had asked date format present in the date column. Right click on the date column and click edit row.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

And also do confirm what is the delimiter used? Is the date format in the field is constant in length? Any null values or spaces in that field ...
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
pravin1581
Premium Member
Premium Member
Posts: 497
Joined: Sun Dec 17, 2006 11:52 pm
Location: Kolkata
Contact:

Post by pravin1581 »

DSguru2B wrote:Who created this file? Is it some external process or DataStage? And if datastage did, then did a server job create it or a px job?
The file has been created with a server job.
Post Reply