ILE Cobol and IP Sockets

5 pts.
Tags:
AS/400
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.
ASKED: November 9, 2005  8:00 AM
UPDATED: November 9, 2005  8:26 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following