BPX1GCL (getclientid) example

The following code obtains the clientid information for caller. This information is used on givesocket (BPX1GIV) and takesocket (BPX1TAK) services. For the callable service, see getclientid (BPX1GCL, BPX4GCL) — Obtain the calling program's identifier. For the data structure, see BPXYCID — Map the returning structure for getclientid(). AMODE 64 callers use BPX4GCL (getclientid) example.
                                              
         CALL  BPX1GCL,              get clientid information          +
               (=F'2',               Input: Function code of 2         +
               =A(AF_INET),          Input: Domain of AF_INET          +
               CID,                  Output: Clientid information      +
               RETVAL,               Return value: 0 or -1             +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               VL,MF=(E,PLIST)       ----------------------------------