How to compile an enternal C/C++ Routine and use in DS PX
Moderators: chulett, rschirm, roy
How to compile an enternal C/C++ Routine and use in DS PX
Hi,
We have recently jumped from Server Version to PX and have to migrate jobs from Server verison to PX. While reading the Pdfs in my understanding that basic routines are no more usable in PX. So to acheive teh same funcationality we will have to write C/C++ functions and call it from transformer. I could not find any good example(s)/tutorial in any Pdf to how to build Parallel external routines on windows platform.
Can some guid me how to compile and link the routine in DS PX or any sample for it.
Thanks in Advance.
We have recently jumped from Server Version to PX and have to migrate jobs from Server verison to PX. While reading the Pdfs in my understanding that basic routines are no more usable in PX. So to acheive teh same funcationality we will have to write C/C++ functions and call it from transformer. I could not find any good example(s)/tutorial in any Pdf to how to build Parallel external routines on windows platform.
Can some guid me how to compile and link the routine in DS PX or any sample for it.
Thanks in Advance.
Regards,
Affan
"Questioning is Half Knowledge"
Affan
"Questioning is Half Knowledge"
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: How to compile an enternal C/C++ Routine and use in DS P
You may refer to your DataStage Client installation disk in \Samples\TrxExternalFunctions\, it gives you a sample to build Parallel Transformer External Function.
maffan76 wrote:Hi,
We have recently jumped from Server Version to PX and have to migrate jobs from Server verison to PX. While reading the Pdfs in my understanding that basic routines are no more usable in PX. So to acheive teh same funcationality we will have to write C/C++ functions and call it from transformer. I could not find any good example(s)/tutorial in any Pdf to how to build Parallel external routines on windows platform.
Can some guid me how to compile and link the routine in DS PX or any sample for it.
Thanks in Advance.
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
Correction, look in the Parallel Job Advanced Developer's Guide.ray.wurlod wrote:Read the chapter on Custom Stages in the Parallel Job Developer's Guide.
Going to add this thread to my favourites.
You can also look in the old Orchestrate Guides as they have some more sample C code and are sometimes more complete then the DataStage guides. Ask Ascential Support for a copy.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
I assume you want to replace your old DataStage BASIC routines with C functions. These functions can be called directly from a parallel transformer and the sample functions are a good place to start. It is written in a C language so you should find a good C reference book, I don't think Ascential have any documentation on these.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Thanks everyone,
I did look into the Parallel Job Advanced Developer Guide but could nto find anything related to Parallel Routines. it does explain the Stage Type but no tutorial on Parallel Routines.
As far as the samples are concerned, no sample of windows and there are no exmaples of how to build parallel routines for Windows Platform as i am running 7.5x2 on windows XP (for sample dev) though i know the platform is not officially supported but the version runs on this with no problem, correct me if i am wrong.
I did look into the Parallel Job Advanced Developer Guide but could nto find anything related to Parallel Routines. it does explain the Stage Type but no tutorial on Parallel Routines.
As far as the samples are concerned, no sample of windows and there are no exmaples of how to build parallel routines for Windows Platform as i am running 7.5x2 on windows XP (for sample dev) though i know the platform is not officially supported but the version runs on this with no problem, correct me if i am wrong.
Regards,
Affan
"Questioning is Half Knowledge"
Affan
"Questioning is Half Knowledge"
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Why would a C routine on Windows be any different from the same C routine on UNIX? Unless, of course, it interacts with the file system (pathnames are different) - but the whole goal of parallel jobs is to keep data in memory (virtual Data Sets) as much as possible.
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.
The routine code may be the same, but to create a windows DLL you will require a different function decleration and sometimes different include definitions. This is due to the way the windows platform uses a DLL at runtime.ray.wurlod wrote:Why would a C routine on Windows be any different from the same C routine on UNIX?
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
Re: How to compile an enternal C/C++ Routine and use in DS P
[quote="maffan76"]Hi,
We have recently jumped from Server Version to PX and have to migrate jobs from Server verison to PX. quote]
And another thing, you don't have to migrate your jobs from server to PX. You only need to migrate those jobs that need to run faster and would benefit from a parallel architecture. Since you already have a large investment in server jobs and server routines why migrate those that are working and working well? Server jobs and parallel jobs can live happily together. You may also find a parallel job with a server transformer gives you enough of a performance improvement.
We have recently jumped from Server Version to PX and have to migrate jobs from Server verison to PX. quote]
And another thing, you don't have to migrate your jobs from server to PX. You only need to migrate those jobs that need to run faster and would benefit from a parallel architecture. Since you already have a large investment in server jobs and server routines why migrate those that are working and working well? Server jobs and parallel jobs can live happily together. You may also find a parallel job with a server transformer gives you enough of a performance improvement.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn