I am programming in ILE Cobol and want to use IP Socket to communicate with an application on a Linux server. However, I cannot get the content of the C++ variable 'errno' returned back into the Cobol program. I have declared 'errno' as external, 'call procedure' the sockets functions and have bound the whole lot with the QSYS/QSOSRV1 sockets service program, but it does not work.
The declaration of errno follows:
01 errno pic s9(09) binary external.
An example of the call follows:
Call procedure "bind" using by value
returning into socket-error
The 'Socket' AND 'Setsockopt' functions work and returns the socket descriptor, etc. The 'Bind' does not work and I do not know how to trace the problem but through 'errno'.
Any help will be appreciated.
November 9, 2005 8:00 AM
November 9, 2005 8:26 AM