z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


TIMEOUT parameter

z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference
SC27-3660-00

If the time specified in the TIMEOUT parameter elapses before any event is detected, the SELECT call returns, and the RETCODE is set to 0.

Figure 1 shows an example of SELECT call instructions.

Figure 1. SELECT call instruction example
    WORKING-STORAGE SECTION.
        01  SOC-FUNCTION    PIC X(16)  VALUE IS 'SELECT'.
        01  MAXSOC          PIC 9(8) BINARY.
        01  TIMEOUT.
            03  TIMEOUT-SECONDS   PIC 9(8) BINARY.
            03  TIMEOUT-MICROSEC  PIC 9(8) BINARY.
        01  RSNDMSK        PIC X(*).
        01  WSNDMSK        PIC X(*).
        01  ESNDMSK        PIC X(*).
        01  RRETMSK        PIC X(*).
        01  WRETMSK        PIC X(*).
        01  ERETMSK        PIC X(*).
        01  ERRNO           PIC 9(8) BINARY.
        01  RETCODE         PIC S9(8) BINARY.
 
    PROCEDURE DIVISION.
         CALL 'EZASOKET' USING SOC-FUNCTION MAXSOC TIMEOUT
                        RSNDMSK WSNDMSK ESNDMSK
                        RRETMSK WRETMSK ERETMSK
                        ERRNO RETCODE.

* The bit mask lengths can be determined from the expression:

((maximum socket number +32)/32 (drop the remainder))*4

Bit masks are 32-bit fullwords with one bit for each socket. Up to 32 sockets fit into one 32-bit mask [PIC X(4)]. If you have 33 sockets, you must allocate two 32-bit masks [PIC X(8)].

For equivalent PL/I and assembler language declarations, see Converting parameter descriptions.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014