Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
INITIALIZE z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference SC27-3660-00 |
|
Use the INITIALIZE command to preallocate a socket set. A socket set is a number of preallocated sockets available to a single REXX application. You can define multiple socket sets for one session, but only one socket set can be active at a time. The INITIALIZE command must be issued before any socket services are requested. Guideline: When multiple socket sets are initialized,
the last socket set that is initialized becomes the active socket
set. Before closing a socket belonging to a specific socket set, you
must ensure that the socket set that owns the socket is the active
set. Otherwise, the CLOSE command fails.
Format.-,--40------. >>-SOCKET--(--+-"INITIALIZE"-+--,--subtaskid--+------------+----> '-"INITIALISE"-' '-,--maxdesc-' >--+------------+--)------------------------------------------->< '-,--service-' Parameters
Returned valueThe command returns a string that contains the return code, the name of the socket set, the number of socket descriptors that can be opened, and the name of the TCP/IP services, for example, 0 MYTASK 40 TCPSVT. The return code can be 0, a REXX socket API error number, or the REXX TCP/IP error number that is set by the socket command. The return code 0 indicates that the requested socket command was completed successfully. For information about the format of the NAME string, see How structures are represented. See Socket call error return codes for additional information about the numeric error codes that are returned by this command. The following REXX TCP/IP error numbers can be returned:
The following REXX socket API error numbers can be returned:
Tip: If the 2003 ESUBTASKINVALID error code is returned, issue the TERMINATE command and then reissue
the INITIALIZE command. If the command continues to fail, verify that
the value of service parameter is applicable for
the system.
LE C/C++ equivalentThis command has no LE C/C++ equivalent. Code exampleThe example code described in GETADDRINFO can be used to experiment with the INITIALIZE command in a CINET environment. |
Copyright IBM Corporation 1990, 2014
|