Cannot append %DateIn Metatags to target DRS

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
poornimajayan
Participant
Posts: 16
Joined: Sun Apr 17, 2005 11:27 pm

Cannot append %DateIn Metatags to target DRS

Post by poornimajayan »

Hi,
When I converted my target DRS to a userdefined SQL and when I used %DateIn to a Date field, Data Stage is not taking the same. If I use a %Substring, it is taking. This issue occurs in DB2 OS390. If I won't use this ,Datastage is giving an error Inserted value too larger for the column since the target will accept only date and not the time.Does anyone have any suggestions?
Andal
Participant
Posts: 124
Joined: Thu Dec 02, 2004 6:24 am
Location: Bangalore, India

Post by Andal »

Hi Poornima

You are using a DRS, Then why you are going for userdefined SQL, which will remove the "D"ynamic Part.
Rgds
Anand
poornimajayan
Participant
Posts: 16
Joined: Sun Apr 17, 2005 11:27 pm

Post by poornimajayan »

Hi Andal,
This is because my target accepts only the Date and not the DateTime. If you use the Generated one, it will automatically append the Time part also to the Date which I am passing since DataStage will convert into that format.That is why I used the Userdefined one.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What is the precise data type of this column in the database table? Date or TimeStamp? Different databases handle this differently - some (such as Oracle) don't differentiate, while others do. What this means mostly is that you can't assume that what works with one database will work with another. DRS has the terrible tendency to do things the Oracle way. Have you considered using a DB2/UDB stage?
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 »

Have you considered doing the equivalent in the job before sending it off to the DRS stage?
-craig

"You can never have too many knives" -- Logan Nine Fingers
poornimajayan
Participant
Posts: 16
Joined: Sun Apr 17, 2005 11:27 pm

Post by poornimajayan »

Ray,
I using a normal DRS and my Job should work independent of the databases(Oracle/DB2/SQL Server).The issues I quoted is DB2 specific and there the undelying datatype is Date.But while passing the value to the target, the DRS automatically takes the time part.That is why I am using the Metatag and making the target as userdefined one.
Thanks,
Poornima.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

"Should". Famous last words. Read my earlier post again.
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