Substrings functionality in Parallel

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
dh_Madhu
Premium Member
Premium Member
Posts: 65
Joined: Sat Apr 23, 2005 3:19 am
Location: Stirling, Scotland

Substrings functionality in Parallel

Post by dh_Madhu »

I have a string which has alphanumeric characters (say D^ata1) and I need to replace the alpha-numerics with a blank (like D ata ). I would choose to go about checking each and every alphabet by using a For Loop for occurances and then use the Ereplace function.
Is this feasible without a Substrings function?

What is the equalent of the "Substrings" function that is avialable in server edtion in Parallel?

Thanks in Advance!

Regards,
Madhu
Regards,
Madhu Dharmapuri
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In Modify stage, it's substring[startpos, length](string)
In Transformer stage, choose Substrings from the operator menu in the Expression Editor - it's the conventional square bracket notation also used in server jobs.
For more detail search in Parallel Job Developer's Guide (parjdev.pdf) for "substring".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Abhijeet
Participant
Posts: 20
Joined: Wed Jul 27, 2005 1:00 am

Explore Iconv and Oconv functions ....

Post by Abhijeet »

Your problem will be solved using the Iconv and Oconv functions. Explore these functions in the Datastage Help file. One of the options in the functions is used for retaining or deleting the alphanumeric characters from the input string.

I am unable to tell you the exact syntax , as my PC don't have Datastage . :cry:
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post by elavenil »

IConv & OConv functions cannot be used in Parallel transformer unless BASIC transformer used in a parallel job.

Regards
Saravanan
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

In a transformer the AlNum function tells you whether any non alpha numerics exist and the convert function can replace them. Convert supports a fromlist of strings and a tolist. You put all your no alphas into the fromlist and a space in the tolist.

There are very few examples of parallel functions in the DataStage manual, I find it useful to keep a test job that reads and writes a small amount of test data through a transformer and I test out functions in it before adding it to other more complex jobs.

If anyone out there has examples where they have used the convert function please reply. Especially the syntax for multiple fromlist values converted to a single tolist value.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Isn't it the same as in server jobs? For example

Code: Select all

Convert("abcdef", "xxxxxx", InLink.TheString)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Post by bcarlson »

ray.wurlod wrote:Isn't it the same as in server jobs? For example

Code: Select all

Convert("abcdef", "xxxxxx", InLink.TheString)
Ray, do you know if the convert function is also available in the buildops? We rarely, if ever, use Transforms, but use buildops all the time. Convert() would be handy if available.

Thanks, in advance, for the info!

Brad.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I would have to check that out. This week I'm on the road (as usual) at a server-only site. If it's possible I imagine you would find it in the Orchestrate manuals. Problem is, it may not have the same name.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
benny.lbs
Participant
Posts: 125
Joined: Wed Feb 23, 2005 3:46 am

Post by benny.lbs »

It is available in server routine, but buildops I havn't tested it yet
bcarlson wrote:
ray.wurlod wrote:Isn't it the same as in server jobs? For example

Code: Select all

Convert("abcdef", "xxxxxx", InLink.TheString)
Ray, do you know if the convert function is also available in the buildops? We rarely, if ever, use Transforms, but use buildops all the time. Convert() would be handy if available.

Thanks, in advance, for the info!

Brad.
Post Reply