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


SELECT call

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

In a process where multiple I/O operations can occur, it is necessary for the program to be able to wait on one or several of the operations to complete. For example, consider a program that issues a READ to multiple sockets whose blocking mode is set. Because the socket would block on a READ call, only one socket could be read at a time. Setting the sockets nonblocking would solve this problem, but would require polling each socket repeatedly until data became available. The SELECT call allows you to test several sockets and to execute a subsequent I/O call only when one of the tested sockets is ready, thereby ensuring that the I/O call does not block.

To use the SELECT call as a timer in your program, do one of the following:
  • Set the read, write, and exception arrays to zeros.
  • Specify MAXSOC <= 0.
The following requirements apply to this call:
Requirement Description
Authorization: Supervisor state or problem state, any PSW key
Dispatchable unit mode: Task
Cross memory mode: PASN = HASN
Amode: 31-bit or 24-bit
ASC mode: Primary address space control (ASC) mode
Interrupt status: Enabled for interrupts
Locks: Unlocked
Control parameters: All parameters must be addressable by the caller and in the primary address space

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014