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


setservent()

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

The setservent() call opens the hlq.ETC.SERVICES data set and resets it to its starting point. If the stayopen flag is nonzero, the hlq.ETC.SERVICES data set remains open after every call.
Note: The hlq.ETC.SERVICES data set is described in the z/OS Communications Server: IP Configuration Reference.
#include <manifest.h>
#include <socket.h>
 
int setservent(int stayopen)
Parameter
Description
stayopen
A flag that can be set to prevent data set hlq.ETC.SERVICES closing after each call to setservent().

Return values

The value 0 indicates success; the value -1 indicates an error. Errno identifies the specific error, returning the errno value of the fopen() call.

Related calls

endservent(), getservbyname(), getservent()

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014