z/OS Communications Server: IP CICS Sockets Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


GETCLIENTID, GIVESOCKET, and TAKESOCKET

z/OS Communications Server: IP CICS Sockets Guide
SC27-3649-00

The socket calls GETCLIENTID, GIVESOCKET, and TAKESOCKET are unique to the IBM® implementation of the socket interface. In CICS® TCP/IP, they are used with the EXEC CICS START and EXEC CICS RETRIEVE commands to make a socket available to a new process. This is shown in Figure 1.

Figure 1. Transfer of CLIENTID information
Diagram that shows the procedure of CLIENTID information transfer.

Figure 1 shows the calls used to make a listener socket available to a child server process. It shows the following steps:

  1. The listener calls GETCLIENTID. This returns the listener’s own CLIENTID (CLIENTID-L), which comprises the MVS™ address space name and subtask identifier of the listener. The listener transaction needs access to its own CLIENTID for step 3.
  2. The listener calls GIVESOCKET, specifying a socket descriptor and the CLIENTID of the child server.

    If the listener and child server processes are in the same CICS region (and so in the same address space), the MVS address space identifier in CLIENTID can be set to blanks. This means that the listener’s address space is also the child’s address space.

    If the listener and child server processes are in different CICS regions, enter the new address space and subtask.

    In the CLIENTID structure, the supplied listener sets the address space name and subtask identifier to blanks. This makes the socket available to a TAKESOCKET command from any task in the same MVS image, but only the child server receives the socket descriptor number, so the exposure is minimal. For total integrity, the subtask identifier of the child server should be entered.

  3. The listener performs an EXEC CICS START. In the FROM parameter, the CLIENTID-L, obtained by the previous GETCLIENTID, is specified. The listener is telling the new child server where to retrieve its socket from in step 5.
  4. The child server performs an EXEC CICS RETRIEVE. In the INTO parameter, CLIENTID-L is retrieved.
  5. The child server calls TAKESOCKET, specifying CLIENTID-L as the process from which it wants to take a socket.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014