Gurus,
I've written a server routine which I wanted to convert to parallel routine.
We have c compiler installed on box , I wanted to wrap the below code in c shell and ompile it but I'm not sure abt the syntax i.e. can below code be just included in c shell as it is ..i tried to search for examples but got not luck ...below is the code....if anybody can help on this.
**************************************************
cmd = "cd /opt/isproj/ctl/ && ./ctlAccess" :" " :Arg1
Call DSExecute("UNIX",cmd,Output,SystemReturnCode)
Temp=EReplace(Output, @FM, "~")
Ans= Trim(Temp)
Ans = Field(Temp,'~', 3)
**************************************************
Regards,
Munish
COnver Server routine to parallel
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
First problem: you need a C++ compiler, not a C compiler. Do you have one?
Second problem: have you given any thought to what happens when your command runs multiple copies in parallel? Will it work properly?
Second problem: have you given any thought to what happens when your command runs multiple copies in parallel? Will it work properly?
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.
Hi Ray,
We have c++ compiler and our job will be running in in sequential mode i.e. we have MQ Websphere plugin as source and messages are generated in order like before and after image comparison .....we have created the POC and it works ...we need to get the value from ctl tables on basis of argument passed...it works fine in server routine ..i tried to use the basic transformer but it failed. the only option I had was to create parallel routine for the below code and compile it thru c++ compiler I've never created the parallel routine before as external function.
Thanks
We have c++ compiler and our job will be running in in sequential mode i.e. we have MQ Websphere plugin as source and messages are generated in order like before and after image comparison .....we have created the POC and it works ...we need to get the value from ctl tables on basis of argument passed...it works fine in server routine ..i tried to use the basic transformer but it failed. the only option I had was to create parallel routine for the below code and compile it thru c++ compiler I've never created the parallel routine before as external function.
Thanks
ray.wurlod wrote:First problem: you need a C++ compiler, not a C compiler. Do you have one?
Second problem: have you given any thought to what happens when your command runs multiple copies in parallel? Will it work properly?
Hi,
I even proposed it to call from sequencer and pass the routine value to parallel job....but we can not use sequencer as our job source is MQ websphere and the way its configured it will pick up the messages(segments) from UDB log i.e. as soon as UDB table are updated the message will be published in MQ and ETL job whose source is MQ websphere will parse it to process the segment.....so there is no sequencer involved.
Regards,
I even proposed it to call from sequencer and pass the routine value to parallel job....but we can not use sequencer as our job source is MQ websphere and the way its configured it will pick up the messages(segments) from UDB log i.e. as soon as UDB table are updated the message will be published in MQ and ETL job whose source is MQ websphere will parse it to process the segment.....so there is no sequencer involved.
Regards,
chulett wrote:Where / how often do you call this? Seems to me you may be able to leave it as and call it from a Sequence job, depending on the answer.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
In server job MQ websphere stage is not available and also IBM has developed some segment splitter and product called DTS which we are using and its only available in parallel job pallette.ray.wurlod wrote:Why not just leave it as a server job? The startup overhead is much less, which means that the output would arrive sooner.
Regards,
To convert your basic routine to C routine is doable. The first two lines are ok via using strcat and system in C, but you may have to dig into the include files in .../DSEngine/include or .../PXEngine/include to find out if those functions such as trim, Ereplace/Convert, Field are declared, and search the binary .so to find out if these functions exist. I never got a time to search it, and please let me know if you get it to work.
Since you want to run the job in sequencial, why don't you keep exploring the Basic Transformer option if you find the C code is too much to do. You can post the failing message in your job here, I may be able to help on it.
Since you want to run the job in sequencial, why don't you keep exploring the Basic Transformer option if you find the C code is too much to do. You can post the failing message in your job here, I may be able to help on it.
Pneuma Lin.
pneumalin@yahoo.com
pneumalin@yahoo.com