AnuKass
21st December 2018, 08:12
Hi all ,
Today i trying some interesting topic -"Interprocess Communication-in baan ".but i have doubt in this?
how to possible connect the sender and receiver?
Is that program in 4GL or 3GL ?
then sock.listen(port number)-in this which port number i use?if i use putty port number ,how to connect baan and putty?
Thanks in Advance..
Ajesh
21st December 2018, 10:09
There are two IPC's one @ bshell Level and the Other @ OS Level.. What exactly is your requirement?
Sessions do communicate using bms commands at bshell level
AnuKass
21st December 2018, 11:22
Hi,..Ajesh
Thanks for your reply ..
can you please send any script which was you tried ..??
AnuKass
21st December 2018, 13:51
Is it in this any client and server program separately ?
if yes ,please explain it...in programming level..
Ajesh
30th December 2018, 03:48
Well Anukass, i have used prcm.bms commands ,i.e, one session communicates with other. I am now looking for implementation of these IPC's after your posts...
Ajesh
10th January 2019, 11:21
You can use bms.send and bms.recieve and get the processes talking to each other..What have you tried?
AnuKass
11th January 2019, 13:53
Hi
can you please send sample server and client side program in socket?
Ajesh
14th January 2019, 10:12
I have not done on cross platform, i assume you mean different servers??
Have done on same Server. This is what i have done
On Sending Side
function extern send.bms.commands()
{
long process.id,ret.val
long event(EVTMAXSIZE), bms_id
process.id = activate("gbtstupd.inv")
| ret.val = send.bucket(process.id,"This is a Test Message")
ret.val = bms.send("Sending BMS Message",event,"",process.id)
}
On Receiving Side
choice.bms:
before.choice:
level = 0
received.text = bms.receive$(level,0)
message("String Recieved is %s",received.text)
AnuKass
22nd January 2019, 13:59
Hi Ajesh,
process.id = activate("gbtstupd.inv")
In this "gbtstupd.inv" means?then i think both are in different session script right?so which should be execute first ?and how?
Ajesh
22nd January 2019, 15:48
Yes, First I am activating the session,gbtstupd.inv and then sending bms command to it.
And then in the gbtstupd.inv , I have written the choice command in which I am receiving the bms command.
Sending and receiving.
AnuKass
23rd January 2019, 06:21
Thanks..Ajesh ..
i'm also trying like what you said but i got nothing ..
Ajesh
23rd January 2019, 09:20
Please Post your code. Let me have a look.
AnuKass
23rd January 2019, 09:42
Hi ..Ajesh
i'm using same logic what you send?
In session1:
choice.print.data:
on.choice:
process.id = activate("tccom9553m000")
ret.val = bms.send("Sending BMS Message",event,"",process.id)
In session2:-tccom9553m000
choice.import:
after.choice:
ret = 0
received.text = bms.receive$(ret,0)
message("String Recieved is %s",received.text)
Thanks in advance..
Ajesh
23rd January 2019, 12:12
Hi Anukass
In the receiving side, you need to use like this
choice.bms:
before.choice:
ret = 0
received.text = bms.receive$(ret,0)
message("String Recieved is %s",received.text)
instead of
choice.import:
after.choice:
ret = 0
received.text = bms.receive$(ret,0)
message("String Recieved is %s",received.text)
Also, in the sending side you can check if a process id is generated by looking at the variable,process.id. It should have some integer value.
AnuKass
23rd January 2019, 12:49
Hi...it's Working ...
Thanks for your valuable reply..