can we write routines in PX?

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
sagar deshmukh
Participant
Posts: 103
Joined: Fri Jan 18, 2008 12:55 am
Location: chennai

can we write routines in PX?

Post by sagar deshmukh »

can we use routines in PX?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I'm tempted to just say "yes", however... write or use? And of what routines do you speak of?
-craig

"You can never have too many knives" -- Logan Nine Fingers
sagar deshmukh
Participant
Posts: 103
Joined: Fri Jan 18, 2008 12:55 am
Location: chennai

Post by sagar deshmukh »

i mean can we use DS basic routines in PX or we need to write them in C++
not sure so wish to know.....

if yes...

Same routine which is used in server can be used in PX?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, Server BASIC routines can be used in a PX "BASIC Transformer" with all of the caveats they bring to the table. Or, better yet, write them in C++.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Before/after job subroutines in parallel jobs are written in DataStage BASIC.

Routines callable from parallel Transformer stage must be written in C++ and compiled and linked, and have an entry in the Routines part of the Repository (a parallel "routine" is actually a description of the location of and arguments for the actual external object).

Routines callable from a BASIC Transformer stage are written in DataStage BASIC and may be the same ones that are used in server jobs.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sagar deshmukh
Participant
Posts: 103
Joined: Fri Jan 18, 2008 12:55 am
Location: chennai

Post by sagar deshmukh »

So aftter writting routine in C++ we need to copy it into the same DS compiler...
Also....Is there any need atall to routines......
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I detect some misunderstanding of how C (or C++) programming works. You don't "copy into a compiler". You use a compiler to convert your source code into something executable, and you use a linker to add references to any other libraries/objects that your code needs.

To use such a routine from a parallel Transformer stage, you need to create a "parallel routine definition" in the Repository. This is not the routine itself, but a piece of metadata that describes the location of the routine and the arguments (and their data types) that it requires.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply