DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
This topic has been marked "Resolved."
Author Message
rythms
Participant



Joined: 29 May 2010
Posts: 3

Points: 18

Post Posted: Fri Jul 30, 2010 11:42 am Reply with quote    Back to top    

DataStage® Release: 8x
Job Type: Parallel
OS: Unix
Hi,

I am getting an error as 'Oconv not defined' when I use the following transform function (in parallel job) to convert mm/dd/yyyy date format to mmddyyyy.

OConv(IConv(DSLink3.BTH_DT, "D/MDY[2,2,4]"), "DMDY[2,2,4]")

Can someone please tell me help me.

Thanks.
anbu



Group memberships:
Premium Members

Joined: 18 Feb 2006
Posts: 377
Location: india
Points: 1492

Post Posted: Fri Jul 30, 2010 11:54 am Reply with quote    Back to top    

Oconv and Iconv are not available in Parallel transformer. You can these functions in BASIC transformer.

You can use convert function to convert mm/dd/yyyy date format to mmddyyyy
Code:
Convert("/","",DSLink3.BTH_DT)

_________________
You are the creator of your destiny - Swami Vivekananda
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

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

Joined: 12 Nov 2002
Posts: 28887
Location: Denver, CO
Points: 149307

Post Posted: Fri Jul 30, 2010 12:58 pm Reply with quote    Back to top    

If your conversion is simply the removal of the delimiters then what anbu posted should work fine for you. If it doesn't then let us know what your target for this "date" is...

_________________
-craig


And as in uffish thought he stood, the Jabberwock, with eyes of flame,
Came whiffling through the tulgey wood, and burbled as it came!
Rate this response:  
Not yet rated
rythms
Participant



Joined: 29 May 2010
Posts: 3

Points: 18

Post Posted: Fri Jul 30, 2010 1:56 pm Reply with quote    Back to top    

Appreciate your inputs.
The output I am getting now is in the format YYYY-MM-DD but I wanted it to look MMDDYYYY. My source is a db and target is a sequential file with output column format as Date.

Thanks again.
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: 41029
Location: Canberra, Australia
Points: 228711

Post Posted: Fri Jul 30, 2010 2:02 pm Reply with quote    Back to top    

The functions you require are StringToDate() and DateToString().

Research these in the Parallel Job Developer's Guide

_________________
Zenith Solutions (Australia) Pty Ltd
-- from obscurity to clarity
Rate this response:  
Not yet rated
rythms
Participant



Joined: 29 May 2010
Posts: 3

Points: 18

Post Posted: Sat Jul 31, 2010 4:11 pm Reply with quote    Back to top    

Thanks Ray... It worked.
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