Import DS function in C++ Routine
Moderators: chulett, rschirm, roy
Import DS function in C++ Routine
Hi,
I would like to know if one of you already used datastage built-in functions in C++ routine for DS PX v8 and if it is possible (or not)
I have to migrate a routine from v7.5 Server to v8 PX and some function like Field, Trim, ... are used in the Server routine and to avoid to redevelop everything in C++, I would like reuse existing Datastage function.
If someone has some tips...
Thanks.
Laurent
I would like to know if one of you already used datastage built-in functions in C++ routine for DS PX v8 and if it is possible (or not)
I have to migrate a routine from v7.5 Server to v8 PX and some function like Field, Trim, ... are used in the Server routine and to avoid to redevelop everything in C++, I would like reuse existing Datastage function.
If someone has some tips...
Thanks.
Laurent
Laurent JULIENNE
SYNCER
SYNCER
ok, so could you tell me what is the syntax to integrate in C++ script, the datastage functions because I use the NullToValue function for example and I got an error message from the compiler.ArndW wrote:And I just implemented a c++ function in V8 today and it worked just as it has in the past. ...
`NullToValue' was not declared in this scope
So I guess I have to declare it but I don't know how in fact.
Laurent JULIENNE
SYNCER
SYNCER
OK, so it seems there is no alternative way than to redevelop DS function equivalent in C++.ArndW wrote:I just checked - the c++ function doesn't use any API calls, and the other object is a buildop which uses a whole different set of calls. ...
Anyway, thanks took some time to help me.
Laurent JULIENNE
SYNCER
SYNCER
I just re-read your initial post and see that I misunderstood what you want to do. There are some DataStage functions that are available in the API, but those string and other functions you alluded to are not available. The TRIM() function is identical in scope in PX, but the "FIELD()" function and all of the specific field/value/subvalue functions are not present. Usually your option is to either use a BASIC transform stage or to completely redesign the job and its computations in a PX framework.
Thanks for the advice, but in fact, I don't want use BASIC Transformer bacause the routine have to be used in PX transformer.ArndW wrote:I just re-read your initial post and see that I misunderstood what you want to do. There are some DataStage functions that are available in the API, but those string and other functions you alluded to ...
An IBM consultant have to come in few days, so I will ask him the workaround.
Thanks for your help.
Laurent JULIENNE
SYNCER
SYNCER
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
BASIC-style functions are used in the parallel Transformer stage and translated into C++ equivalents. You can inspect the generated C++ source code if you wish noting, however, that some of the "translations" involve opaque objects delivered with the product. Source code generated by Transformer stages is in the RT_SCnnn subdirectory (in the project directory on the server) where nnn is the job number.
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.
Just for information, I got the answer from IBM consultant, and there is no header to be used in C++ routine.ljulienne wrote:Thanks for the advice, but in fact, I don't want use BASIC Transformer bacause the routine have to be used in PX transformer.ArndW wrote:I just re-read your initial post and see that I misunderstood what you want to do. There are some DataStage functions that are available in the API, but those string and other functions you alluded to ...
An IBM consultant have to come in few days, so I will ask him the workaround.
Thanks for your help.
Laurent JULIENNE
SYNCER
SYNCER