× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



>We do the translation to ASCII before sending.

Do they expect ASCII?

>They see the connection on their end OK, it's
>just the connection stays on port 5550 so
>they don't get the data when we send it.
>They still see us connected to 5550
>even after they've handed us off to another port.

Right.  How do "they" know they've handed you off to another port?

>Here's what the vendor told us to do: ( I
>don't understand the part about setting
>the socket to some unique value e.g.,
>34567)
>
>Looking at what should be done at CPU's side, the logic should be:
>
>// Create an unconnected socket for TCP/IP
>m_Sockfd = ::socket(AF_INET, SOCK_STREAM, 0);
>
>// Connect to serv_addr (xxx.xxx.xxx.xxx, 5550) and
>// set m_Sockfd to some unique value (e.g., 34567)
>connect(m_Sockfd, (struct sockaddr*)&serv_addr, sizeof(serv_addr));
>
>// Send messages to 34567
>send(m_Sockfd, outBuffer, ::strlen(outBuffer), 0)

The reference to 34567 is difficult to understand.
m_Sockfd is returned by socket() as the handle to your local client socket
connexion.
connect() links you (m_Sockfd) to the server (servaddr)
send() transmits the contents of outbuffer to the far side.

I think they mean that you can't hard-code a socket ID in place of m_Sockfd.

Use Telnet and see how the server reacts.  Send it whatever the
documentation says it expects.  Once you have a firm grasp on how the
dialogue should go, you can code that up in the RPG program.  There's
nothing obviously wrong with the RPG snippets you've posted; it looks like a
bulk transfer of some kind.  Do try the Telnet route with one hand-typed
record (cut & paste works).
  --buck


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.