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


GETDOMAINNAME

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

Use the GETDOMAINNAME command to retrieve the name of the domain to which the current TCP/IP stack belongs.

Tip: You can use a resolver trace to determine why a resolver command failed. See z/OS Communications Server: IP Diagnosis Guide.

Format

Read syntax diagramSkip visual syntax diagram
>>-SOCKET--(--"GETDOMAINNAME"--)-------------------------------><

Parameters

This command has no parameters.

Returned value

The command returns a string that contains the return code and the domain, for example, 0 RALEIGH.IBM.COM.

See Socket call error return codes for additional information about the numeric error codes that are returned by this command.

The following REXX socket API error number can be returned:
  • 2005 ESUBTASKNOTACTIVE

LE C/C++ equivalent

This command has no LE C/C++ equivalent.

Code example

Figure 1. GETDOMAINNAME command example
/* REXX EZARXR07 */
/*
 * This sample demonstrates the use of the GETDOMAINNAME
 * socket command.
 */
src = socket("INITIALIZE","MYSET01");
if perror(src,"INITIALIZE") = 0 then do
   Say socket("GETDOMAINNAME");
end;

src = socket("TERMINATE","MYSET01");
src = perror(src,"TERMINATE");
exit 0;

/* This routine returns -1 if the first word if arg 1 is not zero */
perror: if word(arg(1),1) = 0 then return 0; else
    Say arg(2) "Error : "arg(1);
    return -1;

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014