DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
This topic has been marked "Resolved."
Author Message
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42585
Location: Denver, CO
Points: 219186

Post Posted: Fri Jan 26, 2007 10:15 pm Reply with quote    Back to top    

Wink

_________________
-craig

And I'm hovering like a fly, waiting for the windshield on the freeway...
Rate this response:  
Not yet rated
DSguru2B

Premium Poster


since February 2006

Group memberships:
Premium Members, Heartland Usergroup

Joined: 09 Feb 2005
Posts: 6854
Location: Houston, TX
Points: 35675

Post Posted: Sat Jan 27, 2007 2:38 pm Reply with quote    Back to top    

Neutral
I think i really need to take out the 2B outta my name.

_________________
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54225
Location: Sydney, Australia
Points: 294087

Post Posted: Sat Jan 27, 2007 3:47 pm Reply with quote    Back to top    

DSguruji ?

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
DSguru2B

Premium Poster


since February 2006

Group memberships:
Premium Members, Heartland Usergroup

Joined: 09 Feb 2005
Posts: 6854
Location: Houston, TX
Points: 35675

Post Posted: Sat Jan 27, 2007 3:54 pm Reply with quote    Back to top    

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

_________________
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Rate this response:  
Not yet rated
us1aslam1us


since April 2006

Group memberships:
Premium Members, Heartland Usergroup

Joined: 17 Sep 2005
Posts: 822
Location: USA
Points: 4037

Post Posted: Sat Jan 27, 2007 9:43 pm Reply with quote    Back to top    

ray.wurlod wrote:
DSguruji ?


To be honest, a well deserved Wink tag.

_________________
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42585
Location: Denver, CO
Points: 219186

Post Posted: Sun Jan 28, 2007 9:08 am Reply with quote    Back to top    

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

_________________
-craig

And I'm hovering like a fly, waiting for the windshield on the freeway...
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42585
Location: Denver, CO
Points: 219186

Post Posted: Sun Jan 28, 2007 9:09 am Reply with quote    Back to top    

DSguru2B wrote:
Neutral I think i really need to take out the 2B outta my name.

DSGuru2B or DSGuru!2B, that is the question.

_________________
-craig

And I'm hovering like a fly, waiting for the windshield on the freeway...
Rate this response:  
Not yet rated
DSguru2B

Premium Poster


since February 2006

Group memberships:
Premium Members, Heartland Usergroup

Joined: 09 Feb 2005
Posts: 6854
Location: Houston, TX
Points: 35675

Post Posted: Sun Jan 28, 2007 1:57 pm Reply with quote    Back to top    

chulett wrote:

DSGuru2B or DSGuru!2B, that is the question.

Time shall tell Wink

_________________
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54225
Location: Sydney, Australia
Points: 294087

Post Posted: Mon Nov 26, 2007 1:02 am Reply with quote    Back to top    

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.

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
kduke

Premium Poster


since February 2006

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 29 May 2003
Posts: 5227
Location: Dallas, TX
Points: 35013

Post Posted: Mon Nov 26, 2007 8:23 pm Reply with quote    Back to top    

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.

_________________
Mamu Kim
Rate this response:  
Not yet rated
kduke

Premium Poster


since February 2006

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 29 May 2003
Posts: 5227
Location: Dallas, TX
Points: 35013

Post Posted: Mon Nov 26, 2007 8:32 pm Reply with quote    Back to top    

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.

_________________
Mamu Kim
Rate this response:  
Not yet rated
kduke

Premium Poster


since February 2006

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 29 May 2003
Posts: 5227
Location: Dallas, TX
Points: 35013

Post Posted: Mon Nov 26, 2007 8:34 pm Reply with quote    Back to top    

Read:

http://www.dsxchange.com/viewtopic.php?t=91683&highlight=crc32

_________________
Mamu Kim
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54225
Location: Sydney, Australia
Points: 294087

Post Posted: Mon Nov 26, 2007 8:34 pm Reply with quote    Back to top    

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 ?!!

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
kduke

Premium Poster


since February 2006

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 29 May 2003
Posts: 5227
Location: Dallas, TX
Points: 35013

Post Posted: Mon Nov 26, 2007 8:36 pm Reply with quote    Back to top    

Someone needs to organize all this into a real FAQ.

_________________
Mamu Kim
Rate this response:  
Not yet rated
DSguru2B

Premium Poster


since February 2006

Group memberships:
Premium Members, Heartland Usergroup

Joined: 09 Feb 2005
Posts: 6854
Location: Houston, TX
Points: 35675

Post Posted: Tue Nov 27, 2007 4:11 pm Reply with quote    Back to top    

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.

_________________
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours