SOCK gate, CLOSE function

The CLOSE function is called to close the socket connection to the TCP/IP client.

Input Parameters

CONDITIONAL
Optional Parameter
A binary value indicating whether a request to close a socket is conditional. A conditional request to close the socket will fail if the socket is in use.
Values for the parameter are:
  • NO
  • YES
SOCKET_TOKEN
A token that is generated when a socket is created, and is used subsequently to identify the socket.

Output Parameters

SWITCH_TCB
Optional parameter
A binary parameter that specifies whether the socket domain should switch to the socket TCB.
Values of the parameter are:
  • YES
  • NO
REASON
The following values are returned when RESPONSE is DISASTER:
  • ABEND
  • LOCK_FAILURE
  • LOOP
  • SOCKET_IN_USE
The following values are returned when RESPONSE is EXCEPTION:
  • ADDRESS_IN_USE
  • ADDRESS_NOT_AVAILABLE
  • ALREADY_ASSOCIATED
  • CLIENT_ERROR
  • CONNECTION_CLOSED
  • CONNECTION_REFUSED
  • INSUFFICIENT_STORAGE
  • INSUFFICIENT_THREADS
  • INVALID_OPTION
  • IO_ERROR
  • MISSING_OPTION
  • NEVER_ASSOCIATED
  • NO_CONNECTION
  • NO_SOCKET_AVAILABLE
  • NOT_AUTHORIZED
  • NOT_PENDING
  • NOTIFICATION_UNAVAILABLE
  • NOTIFIED
  • SCHEDULED
  • SSL_HANDSHAKE_ERROR
  • STATE_ERROR
  • TCP_NOT_ACTIVE
  • UNKNOWN_SESSION_TOKEN
The following values are returned when RESPONSE is INVALID:
  • INVALID_FORMAT
  • INVALID_FUNCTION
The following values are returned when RESPONSE is PURGED:
  • TASK_CANCELLED
  • TIMED_OUT
RESPONSE
Indicates whether the domain call was successful. For more information, see The RESPONSE parameter on domain interfaces.