Page 2 of 4

Posted: Fri Jan 26, 2007 10:15 pm
by chulett
:wink:

Posted: Sat Jan 27, 2007 2:38 pm
by DSguru2B
:|
I think i really need to take out the 2B outta my name.

Posted: Sat Jan 27, 2007 3:47 pm
by ray.wurlod
DSguruji ?

Posted: Sat Jan 27, 2007 3:54 pm
by DSguru2B
ray.wurlod wrote:DSguruji ?
Now thats more like it. Hehe
Either your a huge Indian movie fan Ray or you've spend a lot of time in India :wink:

Posted: Sat Jan 27, 2007 9:43 pm
by us1aslam1us
ray.wurlod wrote:DSguruji ?
To be honest, a well deserved :wink: tag.

Posted: Sun Jan 28, 2007 9:08 am
by chulett
There aren't all that many places that Ray hasn't spent some time in, it seems, and some would definitely qualify as 'a lot'. :wink:

Posted: Sun Jan 28, 2007 9:09 am
by chulett
DSguru2B wrote::| I think i really need to take out the 2B outta my name.
DSGuru2B or DSGuru!2B, that is the question.

Posted: Sun Jan 28, 2007 1:57 pm
by DSguru2B
chulett wrote: DSGuru2B or DSGuru!2B, that is the question.
Time shall tell :wink:

Posted: Mon Nov 26, 2007 1:02 am
by ray.wurlod
What would really make a good FAQ would be step by step instructions for creating a parallel routine to invoke this function. Begin with the steps for getting it compiled, linked and tested external to DataStage (a small main() program, of course). You might even discuss the relative merits of creating a shared object or a function in a shared library. Finally, of course, the step of creating the "parallel routine" (interlude) in DataStage, again step by step with explanations. For completeness, using the parallel routine in a Transformer stage, and troubleshooting it.

Posted: Mon Nov 26, 2007 8:23 pm
by kduke
Ray is correct. You need to compile your C program. You need to compile it using the same options as DataStage. You can lookup the compiler and options used in the Administrator. I would have to do a search to remember how we did this. When you compile on AIX your file has to end in .C and not .c. This tells your compiler that it is a C++ program. Next name your .o file to be pxReplace.o. You need to add your routine in DataStage and point it to this file. So maybe you put it in /usr/local/bin/pxReplace.o. You need to tell it how many arguments this routine needs. Next you can start using it.

Posted: Mon Nov 26, 2007 8:32 pm
by kduke
I will try to post more details tomorrow. Another tip is your program can have a main() like Ray says. Your routine needs a function to call other than main() but you can have a main() which in this case calls Ereplace(). If you have a main() then you can test it from the UNIX command line. I posted 2 ways of doing this with crc32(). Do a search. One works with command line arguments. The other works by piping data into the command.

You have to compile the routine differently to make it work standalone. The routines need to linked into whatever object code your PX job creates in order for DataStage to use it. A standalone command has to be linked into standard libraries in order to make it work. This was covered in the crc32() routine topic.

Posted: Mon Nov 26, 2007 8:34 pm
by kduke

Posted: Mon Nov 26, 2007 8:34 pm
by ray.wurlod
What I really meant was to create a separate "test bed" containing main(), a bit like the server routines test environment but in C and at the O/S level.

DSguruji, where's the FAQ ?!!

Posted: Mon Nov 26, 2007 8:36 pm
by kduke
Someone needs to organize all this into a real FAQ.

Posted: Tue Nov 27, 2007 4:11 pm
by DSguru2B
Sorry for the delayed response guys, just been burning midnight oil at my end.
As for the FAQ, will definately come up with something, soon.
A main function is nothing but somthing to test out your function. C has been around for ages and hence you can find a lot of info on the web, untill I, or Kim, compose a proper FAQ. Plus I am not at a PX site so will have to see if I can get my hands on a compiler.