Sample px routine
Moderators: chulett, rschirm, roy
Sample px routine
Hi,
I am good at C++ and i am interested in writing parallel routines. I really don't know how to start up.
Can some one send me the syntax or one simple routine so that i can understans it clearly.
Thanks in advance.
I am good at C++ and i am interested in writing parallel routines. I really don't know how to start up.
Can some one send me the syntax or one simple routine so that i can understans it clearly.
Thanks in advance.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If you know how to code in C/C++ then it should be a piece of cake for your. You just need to code functions. Test it out on command line. Then link it to datastage by creating a parallel routine and providing the object file's path. Search will reveal all.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The most important piece, as will all programming, is to establish your requirements and design your algorithm before even touching any code. In the case of DataStage functions, give some thought also to whether you can make the function more generic/re-usable.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 301
- Joined: Thu Jul 14, 2005 10:27 am
- Location: Melbourne, Australia
- Contact:
You can find source code for two parallel routines here:
<a href="viewtopic.php?t=106358">pxEReplace</a> and <a href="viewtopic.php?t=107882">matchRegexp</a>
HTH,
J.
<a href="viewtopic.php?t=106358">pxEReplace</a> and <a href="viewtopic.php?t=107882">matchRegexp</a>
HTH,
J.
<b>John McKeever</b>
Data Migrators
<b><a href="https://www.mettleci.com">MettleCI</a> - DevOps for DataStage</b>
<a href="http://www.datamigrators.com/"><img src="https://www.datamigrators.com/assets/im ... l.png"></a>
Data Migrators
<b><a href="https://www.mettleci.com">MettleCI</a> - DevOps for DataStage</b>
<a href="http://www.datamigrators.com/"><img src="https://www.datamigrators.com/assets/im ... l.png"></a>
Sorry to Hijack This thread:
Once i have created and object file 'routine.o', where do i place it so that my transformer can access the same? Should the location of the object file be an entry in LD_LIBRARY_PATH? Im aware of how to define a parallel routine in manager. But how do i get to use this routine succesfully in transformer?
Thanks
Ramesh
Once i have created and object file 'routine.o', where do i place it so that my transformer can access the same? Should the location of the object file be an entry in LD_LIBRARY_PATH? Im aware of how to define a parallel routine in manager. But how do i get to use this routine succesfully in transformer?
Thanks
Ramesh
You need to create a new routine from Datastage and supply all the necessary details along with the directory path of the object code that are residing.
The new routine will refer the functionality of the created C++ code.
The new routine will refer the functionality of the created C++ code.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
There is no main() function in a px routine. DataStage looks for function name. You can have 10 C functions in a single file doing different transformations, with 10 px routines, all pointing to a single object file and they all will work.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.