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


SELECT

z/OS Communications Server: IP IMS Sockets Guide
SC27-3653-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 will not block.

To use the SELECT call as a timer in your program, do one of the following actions:

  • Set the read, write, and exception arrays to zeros.
  • Specify MAXSOC <= 0.
Table 1. SELECT call requirements
Condition Requirement
Authorization: Supervisor state or problem state, any PSW key.
Dispatchable unit mode: Task.
Cross memory mode: PASN = HASN.
Amode: 31-bit or 24-bit.
Note: See the addressability mode (Amode) considerations under CALL instruction API environmental restrictions and programming requirements.
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