setservent() — Open the network services information data set
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
XPG4.2 |
both |
Format
X/Open:
#define _XOPEN_SOURCE_EXTENDED 1
#include <netdb.h>
void setservent(int stayopen);
Berkeley
sockets:
#define _OE_SOCKETS
#include <netdb.h>
void setservent(int stayopen);
General description
The setservent() function opens and rewinds the /etc/services or the tcpip.ETC.SERVICES data set. For more information on /etc/services or the tcpip.ETC.SERVICES data set, see z/OS Communications Server: IP Configuration Guide. If the stayopen flag is nonzero, the tcpip.ETC.SERVICES data set remains open after each call.
Special behavior for C++: To use this function with C++, you must use the _XOPEN_SOURCE_EXTENDED 1 feature test macro.
Returned value
setservent() returns no values.