BPX1GIV (givesocket) example

The following code gives a socket to the program identified by CID (clientid). The target program may then use takesocket (BPX1TAK) to take the socket. SOCKDESC was previously set by a call to BPX1ACP. CID is set by the getclientid (BPX1GCL) 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 64 callers use BPX4GIV (givesocket) example.
                                              
         CALL  BPX1GIV,              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                       +
               VL,MF=(E,PLIST)       ----------------------------------