Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
GETHOSTNAME z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference SC27-3660-00 |
|
Use the GETHOSTNAME command to return the name of the host on which the application is running. ParametersThis command has no parameters. Returned valueThis command returns a string that contains the return code and the name of the host system, for example, 0 MYHOST01. If the host name is longer than 256 bytes, it is truncated. 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 number can be returned:
The following REXX socket API error number can be returned:
LE C/C++ equivalent
Code exampleFigure 1. GETHOSTNAME command
example
|
Copyright IBM Corporation 1990, 2014
|