× 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.



Hi

I have a program written in ILE RPG (V4R2), that merely sends and receives
data structure to and from a PC via Socket.

For Example:

DbTLogonMsg       DS
D bMsgCode                       5U 0
D bMsgLen                           5U 0
D bChannelId                       5U 0
D bClientId                            5U 0
D bReserved                    10U 0
D bTimeStamp                 10U 0
D bErrorCode                    10U 0
D bErrorMsgLen                  5U 0
D bNoofDec                         1A
D bUserId                             5I 0

DStructure1       DS
D MsgCode1                       5U 0
D MsgLen1                           5U 0

DStructure2       DS
D MsgCode2                       5U 0
D MsgLen2                           5U 0
D ChannelId2                       5U 0
D ClientId2                            5U 0
D Reserved2                    10U 0
D TimeStamp2                 10U 0
D ErrorCode2                    10U 0



eval      rc = send(sock: %addr(bTLogonMsg):%size(bTLogonMsg):0)      <---
Sends that particular structure
eval      rc=recv(sock:%addr(bTLogonMsg):%size(bTLogonMsg):0)
<--- Receives the same structure


Example  2:
eval      rc = send(sock: %addr(bTLogonMsg):%size(bTLogonMsg):0)
eval      rc=recv(sock:%addr(buffer):%size(buffer):0)           <---
Different data structure (May be structure 1, structure 2 etc.)

where the var buffer should be able to receive different types of data
structure. How can I do that in RPG?
How can I point the buffer to a different structures and the first 2 fields
in all the structures are same.

When ever the socket receives something, trigger the event in rpg.Is anyone
have an idea about Socket event?

Pls help. TIA.

Rgds





Confidentiality Caution
=======================
Privileged/Confidential Information may be contained in this message. If
you are not the addressee indicated in this message (or responsible for
delivery of the message to such person), you may not copy or deliver this
message to anyone. In such case, you should destroy this message and kindly
notify the sender by reply email. Opinions, conclusions and other
information in this message that is not of an official nature shall be
deemed as neither given nor endorsed by SGX unless indicated by an
authorised representative independent of this message.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.