CALL "C$SOCKET" USING CSOCKET-GETREMOTEADDRESS                        socketHandle                        CSOCKET-REMOTE-ADDRESS                 GIVING returnCode  | 
CSOCKET-GETREMOTEADDRESS  | Constant  | |
socketHandle  | USAGE HANDLE  | Identifies the socket to be inquired.  | 
CSOCKET-REMOTE-ADDRESS  | Group item  | Structure that receives the information. This group item, defined in issocket.def, has the following structure: 01  csocket-remote-address.     03 csocket-remote-hostname   pic x(64).     03 csocket-remote-ip-address pic x(15).     03 csocket-remote-port       pic 9(5).  | 
0   | Operation succeeded  | 
1  | Operation failed  |