unable to use user defined function

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
rajan.n
Premium Member
Premium Member
Posts: 96
Joined: Mon Oct 09, 2006 7:47 am

unable to use user defined function

Post by rajan.n »

Hi all,
i have created a function and a routine from manager using New server routine with a BASIC code .This is for parallel jobs.
my question is ,i can able to use a routine properly from job properties(parallel jobs),but not function in transformer(parallel). can any body help me in this issue.
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Re: unable to use user defined function

Post by meena »

Hi,
Are you using Basic transformer stage.

[quote"]
my question is ,i can able to use a routine properly from job properties(parallel jobs),but not function in transformer(parallel). can any body help me in this issue.[/quote]
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can not use a server routine in a parallel Transformer stage. You can only use a server routine in a server job or in a BASIC Transformer stage in a parallel job.
Your alternative is to create a parallel 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.
rajan.n
Premium Member
Premium Member
Posts: 96
Joined: Mon Oct 09, 2006 7:47 am

Post by rajan.n »

Hi , so i need to create parallel function, may i know..whats the procedure to create a parallel function or a routine.



ray.wurlod wrote:You can not use a server routine in a parallel Transformer stage. You can only use a server routine in a server job or in a BASIC Transformer stage in a parallel job.
Your alternative is to create a ...
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Post by Kirtikumar »

It is very different than a normal basic routine.

First you have to write the C/C++ function according to your needs. Then compile it using C/C++ compiler available on your machine and the one used in your PX jobs. (You can find the name of compiler in environment variable APT_COMPILE.)
Compile it and create a object file or library. Then go to the DS manager, create PX routine there and mention the object filename or library file as the one created during the compilation. Define the input parameters and output parameter type.

Now you can use this PX routine. To find more do a search on forum of parallel routines. There is also some help available in DS Manager PDF file under chapter Working with Parallel Routines
Regards,
S. Kirtikumar.
rajan.n
Premium Member
Premium Member
Posts: 96
Joined: Mon Oct 09, 2006 7:47 am

Post by rajan.n »

Hi, am using putty to acess unix remote server, can u pls desc. clearly the proces up to creating .o file how to compile the c++ or c program in unix, can we also write code in unix and make it .o file.
thanx much in advance.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Rajan,

Ray already suggested you
...There is also some help available in DS Manager PDF file under chapter Working with Parallel Routines
Once you do that it will answer some of your questions. The general subject of C++ code and creating/compiling/linking such is a bit outside of this forum's scope, but if you have specific questions once having read the documentation then people here will be glad to assist.
Post Reply