Reputation: 393
I would like to build a communication protocol between COBOL and C# applications. I didn't find the right way to connect these two applications. The only possible way is to write data by COBOL to a file and read it by C# application and vice versa.
Can I use socket techniques to create such communication, because the file method has bad performance? Or are there any other methods of communicating data between these two languages?
Upvotes: 1
Views: 563
Reputation: 7297
Can I use socket techniques to create such communication [...]?
Of course! You just need to make one a socket server and the other the client + creating + implementing a protocol (if it is just one client + server and you don't need secure communication this is quite easy). You may already have a socket option in your COBOL environment or use external libraries like the free CBL_GC_SOCKET
(works for many COBOL implementations, as long as they can call C/C++ binaries).
Or are there any other methods of communicating data between these two languages?
A multitude (especially if they run on the same machine).
CALL
/invoke, or can write a layer to do so with running COBOL code translated to native code within C#.Conclusion: there is nothing that hinders COBOL to "communicate" with any reasonable "other programming language", you mainly have to see what you're COBOL and "other programming language" provides and what your goals are.
Upvotes: 1