Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
SOCKET z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference SC27-3660-00 |
|
Use the SOCKET command to open a socket descriptor in the active socket set. Restriction: If the socket type is SOCK_RAW or
RAW, the user ID associated with the REXX socket application must have z/OS® UNIX System Services superuser authority. The user ID must have the UID
value 0 or have read access to the BPX.SUPERUSER security profile.
An application can attempt to obtain superuser authority by issuing
the z/OS UNIX System Services SYSCALLS command: address syscall 'SETEUID 0'. If this command fails, the
user ID does not have the authorization needed to run the program;
contact your security administrator.
Format.-,--AF_INET-. .-,--STREAM-. >>-SOCKET--(--"SOCKET"--+------------+--+-----------+-----------> '-,--domain--' '-,--type---' .-,--0--------. >--+-------------+--)------------------------------------------>< '-,--protocol-' Parameters
Returned valueThe command returns a string that contains the return code and the new socket descriptor, for example, 0 6. 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. 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:
LE C/C++ equivalent
Code exampleFigure 1. SOCKET command example
|
Copyright IBM Corporation 1990, 2014
|