5 pts.
 ILE Cobol and IP Sockets
Hi, 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 socket-descriptor socket-local-address socket-address-length returning into socket-error End-call. 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.

Software/Hardware used:
ASKED: November 9, 2005  8:00 AM
UPDATED: November 9, 2005  8:26 AM

Answer Wiki:
Check out: http://www.iseriesnetwork.com/resources/code/misccode/cobolcode/ About two-thirds the way down the list of sample code is COBOL sample of Sockets Programming "Sample Sockets Programming in COBOL, by Joerg Egger". I've never had to use it, but most the sample code on the iSeriesNetwork site is reliable and documented well enough.
Last Wiki Answer Submitted:  November 9, 2005  8:26 am  by  TheQuigs   0 pts.
All Answer Wiki Contributors:  TheQuigs   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _