SHUTDOWN

The SHUTDOWN macro can be used to close one-way traffic while completing data transfer in the other direction.

The HOW parameter determines the direction of the traffic to shutdown. A client program can use the SHUTDOWN macro to reuse a given socket with a different connection.

Another way to terminate a network connection is to issue a CLOSE macro that attempts to complete all outstanding data transmission requests prior to breaking the connection.

Format

Read syntax diagramSkip visual syntax diagramEZASMITYPE=SHUTDOWN,S= numberaddress*indaddr(reg),HOW= numberaddress*indaddr(reg),ERRNO= address*indaddr(reg),RETCODE= address*indaddr(reg),ECB=address* indaddr( reg),ERROR=address*indaddr(reg),TASK=address*indaddr(reg)

Parameters

S
Input parameter. A value, or the address of a halfword binary number specifying the socket to be shutdown.
HOW
Input parameter. A fullword binary field specifying the shutdown method.
Value
Description
2
Ends further send and receive operations.
ERRNO
Output parameter. A fullword binary field. If RETCODE is negative, ERRNO contains a valid error number. Otherwise, ignore ERRNO.

See ERRNO Values, for information about ERRNO return codes.

RETCODE
Output parameter. A fullword binary field that returns the following:
Value
Description
0
Successful call
-1
Check ERRNO for an error code
ECB
Input parameter. It points to a 160-byte field containing:
  • A four-byte ECB posted by TCP/IP when the macro completes.
  • A 156-byte storage field used by the interface to save the state information.
Note: This storage must not be modified until the macro function has completed and the ECB has been posted .
ERROR
Input parameter. The location in your program to receive control, if the application programming interface (API) processing module cannot be loaded.
TASK
Input parameter. The location of the task storage area in your program.