Defining which sockets to test
The SELECT call monitors for read operations, write operations, and exception operations:
- When a socket is ready to read, one of the following conditions
has occurred:
- A buffer for the specified sockets contains input data. If input data is available for a given socket, a read operation on that socket will not block.
- A connection has been requested on that socket.
- When a socket is ready to write, TCP/IP can accommodate additional output data. If TCP/IP can accept additional output for a given socket, a write operation on that socket will not block.
- When an exception condition has occurred on a specified socket it is an indication that a TAKESOCKET has occurred for that socket.
- A timeout occurs on the SELECT call. The timeout period can be specified when the SELECT call is issued.
Each socket descriptor is represented by a bit in a bit string. The length of this bit-mask array is dependent on the value of the MAXSOC parameter and must be a multiple of 4 bytes.
For information about selecting requests in a concurrent server program, see z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference.
Note: To simplify string processing in COBOL, you can
use the program EZACIC06 to convert each bit in the string to a character.
For more information, see EZACIC06.