z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


SHUTDOWN

z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference
SC27-3660-00

One way to terminate a network connection is to issue the CLOSE call which attempts to complete all outstanding data transmission requests prior to breaking the connection. The SHUTDOWN call can be used to close one-way traffic while completing data transfer in the other direction. The HOW parameter determines the direction of traffic to shutdown.

When the CLOSE call is used, the SETSOCKOPT OPTVAL LINGER parameter determines the amount of time the system will wait before releasing the connection. For example, with a LINGER value of 30 seconds, system resources (including the IMS™ or CICS® transaction) will remain in the system for up to 30 seconds after the CLOSE call is issued. In high volume, transaction-based systems like CICS and IMS, this can impact performance severely.

If the SHUTDOWN call is issued when the CLOSE call is received, the connection can be closed immediately, rather than waiting for the 30-second delay.

If you issue SHUTDOWN for a socket that currently has outstanding socket calls pending, see Table 1 to determine the effects of this operation on the outstanding socket calls.

The following requirements apply to this call:

Figure 1 shows an example of SHUTDOWN call instructions.

Figure 1. SHUTDOWN call instruction example
    WORKING-STORAGE SECTION.
        01  SOC-FUNCTION    PIC X(16)  VALUE IS 'SHUTDOWN'.
        01  S               PIC 9(4) BINARY.
        01  HOW             PIC 9(8) BINARY.
            88  END-FROM      VALUE  0.
            88  END-TO        VALUE  1.
            88  END-BOTH      VALUE  2.
        01  ERRNO           PIC 9(8) BINARY.
        01  RETCODE         PIC S9(8) BINARY.
 
    PROCEDURE DIVISION.
         CALL 'EZASOKET' USING SOC-FUNCTION S HOW ERRNO RETCODE.

For equivalent PL/I and assembler language declarations, see Converting parameter descriptions.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014