BPX4GIV (givesocket) example

The following code gives a socket to the program identified by CID (clientid). The target program may then use takesocket (BPX4TAK) to take the socket. SOCKDESC was previously set by a call to BPX4ACP. CID is set by the getclientid (BPX4GCL) service. For the callable service, see givesocket (BPX1GIV, BPX4GIV) — Give a socket to another program. For the data structure, see BPXYCID — Map the returning structure for getclientid(). AMODE 31 callers use BPX1GIV (givesocket) example.
                                              
         CALL  BPX4GIV,              give a socket to another program  +
               (SOCKDESC,            Input: Socket descriptor          +
               CID,                  Input: Clientid of recipient      +
               RETVAL,               Return value: 0 or -1             +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               MF=(E,PLIST)          ----------------------------------