Page 1 of 1

Substrings functionality in Parallel

Posted: Wed Jul 27, 2005 12:48 am
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

Posted: Wed Jul 27, 2005 1:31 am
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".

Explore Iconv and Oconv functions ....

Posted: Wed Jul 27, 2005 2:09 am
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:

Posted: Wed Jul 27, 2005 2:33 am
by elavenil
IConv & OConv functions cannot be used in Parallel transformer unless BASIC transformer used in a parallel job.

Regards
Saravanan

Posted: Wed Jul 27, 2005 5:38 pm
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.

Posted: Wed Jul 27, 2005 9:26 pm
by ray.wurlod
Isn't it the same as in server jobs? For example

Code: Select all

Convert("abcdef", "xxxxxx", InLink.TheString)

Posted: Thu Jul 28, 2005 9:27 am
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.

Posted: Thu Jul 28, 2005 9:14 pm
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.

Posted: Fri Jul 29, 2005 8:40 am
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.