Problem while conveting input parameter(date format)

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
narasimhareddy
Participant
Posts: 10
Joined: Wed Nov 30, 2005 8:12 am

Problem while conveting input parameter(date format)

Post by narasimhareddy »

i have requirement like based on the input parameter(date) in to sequential file field data type Numeric. In the Numeric field length is 8. Output of sequential file is giving date and ending with period(.). like (2005-12-21.).I am using logic to converting that field is DateToString(inputparameter,"%yyyy%mm%dd"). so please suggest me to avoid period with in the date in the numeric field.

Thanks,
reddy.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Reddy,

the value "2005-12-21." cannot be stored in a numeric field, so there is no answer to the question as you have posed it. The DateToString() function you posted will convert a valid date into a 8 character long fixed representation without any separators, i.e. "20051221" and no decimal point. Are you certain that your input value is not in reality a string - i.e. if you write to a sequential file without using the DateToString() function what values are displayed?
narasimhareddy
Participant
Posts: 10
Joined: Wed Nov 30, 2005 8:12 am

Post by narasimhareddy »

Hi,

My problem is resolved. If i change numeric data type to integer, its not showing period at the end of the data in the field.
Thanks for your suggestion ArndW.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Depends.

2005-12-21 can be stored as 1972, the result of the arithmetic expression.

It's less likely to happen accidentally in parallel jobs, of course, than in server jobs, due to more stringent enforcement of data types.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply