Equivalent function for Server Oconv 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

Post Reply
Billyqing
Participant
Posts: 44
Joined: Thu May 13, 2004 12:00 pm
Location: Canada

Equivalent function for Server Oconv in Parallel job

Post by Billyqing »

Hi
I have used Server function Oconv to retrieve numeric values from the string input.

Oconv("John Smith 1-234", "MCN")

How can I do the same thing in Parallel job?
Anyone knows how to do so?
Thanks in advance.

DS version: DS 7.5.2 E.E

Billy
Bill
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Post by vinothkumar »

Check convert function
Billyqing
Participant
Posts: 44
Joined: Thu May 13, 2004 12:00 pm
Location: Canada

Post by Billyqing »

Convert Function would not do work.

Input Output
-----------------------
"1234567" 1234567
Bill
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Post by vinothkumar »

How did you try ? Can you please paste your exact statement
Billyqing
Participant
Posts: 44
Joined: Thu May 13, 2004 12:00 pm
Location: Canada

Post by Billyqing »

The input string could contain any characters. The return should only contian intergers.

Samples are following:

1234.56--------------------------> 123456
123-456-789---------------------->123456789
ABCD(12-34+ "345")----------------------->1234345

Thanks,
Bill
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Post by vinothkumar »

Can you try this
Convert(Convert('0123456789','','XYZ123.45ABC'),'','XYZ123.45ABC')
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

Vinoth, that was a good one.

Billy, if you are not sure about what special characters can come in the string, you can go for a BASIC transformer in a PX job.
Kandy
_________________
Try and Try again…You will succeed atlast!!
Billyqing
Participant
Posts: 44
Joined: Thu May 13, 2004 12:00 pm
Location: Canada

Post by Billyqing »

Thank you all.

I was thinking to use Basic Transformer but it doesn't appear in the Palett.
I am not sure that it does not work or anything else wrong.

The convert function, Vinoth moentioned below, works now at least.

Thanks again.
Bill
daignault
Premium Member
Premium Member
Posts: 165
Joined: Tue Mar 30, 2004 2:44 pm
Contact:

Post by daignault »

You have to go into the repository to access it, not the pallet. Go to stage types, parallel, and you will see the BASIC Transformer

Regards,

Ray D
Billyqing
Participant
Posts: 44
Joined: Thu May 13, 2004 12:00 pm
Location: Canada

Post by Billyqing »

Thank you, Ray.
Bill
Post Reply