Transformer code

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
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Transformer code

Post by Kirtikumar »

Does anyone know about the C code location generated for transformer?
I tried to find the C code generated from transformer, but not able to locate the code. I got the executable generated for tramsformer, but not the C code.
Regards,
S. Kirtikumar.
Eric
Participant
Posts: 254
Joined: Mon Sep 29, 2003 4:35 am

Post by Eric »

why would you want the 'c' code?
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Post by Kirtikumar »

No answers :(

Can anyone give any inputs whcih are the available functions which can be used in C routines :?:
Regards,
S. Kirtikumar.
donlank
Charter Member
Charter Member
Posts: 24
Joined: Fri Nov 05, 2004 11:30 am

Post by donlank »

Hello,

Well first off, you need to make sure you compile your code with a C++ compiler and not a C compiler. Datastage calls your compiled code, (either setup as an Object/Library). Depending on which method you choose, Object is static and linked to the job (if you change your code you will have recompile the code and job), Library option is linked at run time and the object needs to be a shared library. You should be able to write standard C code, if you get it to work in Unix, Datastage is just going to execute the external code, therefore all the functions should be available for use in your code (of course you will have to include the correct libraries to use the certain functions).
hondaccord94
Participant
Posts: 46
Joined: Tue Aug 10, 2004 11:07 am
Location: Mclean VA

Post by hondaccord94 »

Hi kirtikumar,
you can find the list of functions which can be used in your C code for you buildops in the documentation of the parallel extender like asString(),null(),isValid() etc ..
You check this example ,which can give some idea of how to use these functions in your code.

1 -->out.outputcolumnname = in.inputcolumnname.asInteger();

2 --->
if (!date.isValid()){
out.date_setnull();
}
else{
out.date = Date1;
}
}
Post Reply