DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
aladap12
Participant



Joined: 20 Jul 2007
Posts: 60
Location: NO
Points: 607

Post Posted: Thu Mar 06, 2008 10:36 am Reply with quote    Back to top    

DataStage® Release: 7x
Job Type: Server
OS: Unix
All

I had an issue with date conversion

My source file has date formet 'mmddyy' and i need to send to target in other formet lilke mmdd18yy

means everytime i have to add 18 to source data and send the data

Is there any function in ds do this for me or should need to write any routine for this.

please suggest me on this issue.

Thanks
svipul16
Participant



Joined: 23 Sep 2007
Posts: 8

Points: 67

Post Posted: Thu Mar 06, 2008 10:41 am Reply with quote    Back to top    

In Transformer do derivation as

Left(cloumn_name,4):18:right(cloumn_name,2)





I had an issue with date conversion

My source file has date formet 'mmddyy' and i need to send to target in other formet lilke mmdd18yy

means everytime i have to add 18 to source data and send the data

Is there any function in ds do this for me or should need to write any routine for this.

please suggest me on this issue.

Thanks[/quote]
Rate this response:  
Not yet rated
kumar_s

Premium Poster


since February 2006

Group memberships:
Premium Members, Heartland Usergroup

Joined: 16 Jun 2005
Posts: 5245

Points: 26379

Post Posted: Thu Mar 06, 2008 11:11 am Reply with quote    Back to top    

Since you are doing a string Manupulation, add qoute around 18 from the given solution.
Left(cloumn_name,4):'18':right(cloumn_name,2)

_________________
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Rate this response:  
Not yet rated
aladap12
Participant



Joined: 20 Jul 2007
Posts: 60
Location: NO
Points: 607

Post Posted: Thu Mar 06, 2008 1:08 pm Reply with quote    Back to top    

kumar_s wrote:
Since you are doing a string Manupulation, add qoute around 18 from the given solution.
Left(cloumn_name,4):'18':right(cloumn_name,2) ...


Thanks a lot

can we have any routine to do this, b'cos i have to use this in diffrent jobs

Thanks
Rate this response:  
Not yet rated
kumar_s

Premium Poster


since February 2006

Group memberships:
Premium Members, Heartland Usergroup

Joined: 16 Jun 2005
Posts: 5245

Points: 26379

Post Posted: Thu Mar 06, 2008 1:19 pm Reply with quote    Back to top    

Do you mean to say, you need to perform this task in various other jobs as well. Include the same statment in other jobs as well. Ofcouse you can write a routine, but its not that effective or this si ...

_________________
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Rate this response:  
Not yet rated
kumar_s

Premium Poster


since February 2006

Group memberships:
Premium Members, Heartland Usergroup

Joined: 16 Jun 2005
Posts: 5245

Points: 26379

Post Posted: Thu Mar 06, 2008 1:21 pm Reply with quote    Back to top    

Do you mean to say, you need to perform this task in various other jobs as well. Include the same statment in other jobs as well. Ofcouse you can write a routine, but its not that effective or this si ...

_________________
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54595
Location: Sydney, Australia
Points: 296053

Post Posted: Thu Mar 06, 2008 3:51 pm Reply with quote    Back to top    

Store the one-liner as a Transform rather than as a Routine.

_________________
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Rate this response:  
Not yet rated
jdmiceli



Group memberships:
Premium Members

Joined: 22 Feb 2006
Posts: 309
Location: Urbandale, IA
Points: 3577

Post Posted: Fri Mar 07, 2008 9:27 am Reply with quote    Back to top    

One point of clarification: are you intending to prepend 18 to any two digit year? OR do you need to add either 18 days or 18 years to the existing date? If you are prepending 18 to the YY supplied, you are stating you want all of the year portions of a date to be in the 19th century.

Guess I'm just curious as to why?? Confused

_________________
Bestest!

John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services


"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours