STRHOSTSVR (Start Host Server)
STRHOSTSVR Command syntax diagram
Purpose
The Start Host Server (STRHOSTSVR) command is used to start the optimized host server daemons and the server mapper daemon.
There is one server daemon for each of the host server types. In addition, there is one server mapper daemon for all host servers which provides support for client applications to obtain a particular host server daemon's port number. This port number is then used by the client application to connect to the host server's daemon. The daemon accepts the incoming connection request and routes it to the server job for further processing.
The daemons are batch jobs submitted to either the QSYSWRK or QSERVER subsystem, depending on the value or values specified for the SERVER keyword. All daemon jobs are submitted to the QSYSWRK subsystem with the exception of the *DATABASE and *FILE server daemons which are submitted to the QSERVER subsystem.
In order for the server daemons and the server mapper daemon to start successfully, the QSYSWRK subsystem and, for *DATABASE and *FILE server, the QSERVER subsystem must be active. If the required subsystem is not active, then the submission of the daemon job will fail. Additionally, the QUSRWRK subsystem or the user-defined subsystem must be active in order to start the associated server jobs. All associated server jobs can run in the QUSRWRK subsystem or a user-defined subsystem, except for the following:
- Server jobs QPWFSERVSO and QPWFSERVSS - these jobs run in the QSERVER subsystem or a user-defined subsystem
- Server job QPWFSERVS2 - this job runs in the QSERVER subsystem>
- Server job QIWVPPJT - this job runs in the QSYSWRK subsystem
- Server job QTFPJTCP - this job runs in the QSERVER subsystem
There are no server jobs associated with the server mapper daemon.
The server daemons must be active in order to allow client applications to establish a connection with the host server using sockets communication support. Once started, the server daemons and the server mapper daemon remain active until they are ended explicitly using the End Host Server (ENDHOSTSVR) command or an error occurs.
Restrictions
- This command is used only for enabling client applications to communicate with any of the host servers using sockets communication support. This command does not start any of the APPC host servers; these are started as a result of a program start request.
- Only one server daemon can be active for a specific server type. Requests to start a server daemon that is already active will result in an informational message to the user issuing this command.
Required Parameters
- SERVER
- Specifies the host server daemons to be started by this command.
*ALL: All of the server daemons and the server mapper daemon are started.
*CENTRAL: The central server daemon is started in the QSYSWRK subsystem. The daemon job is named QZSCSRVSD. The associated server job is named QZSCSRVS.
*DATABASE: The database server daemon is started in the QSERVER subsystem. The daemon job is named QZDASRVSD. The associated server jobs are named QZDASOINIT, QZDASSINIT, and QTFPJTCP.
*DTAQ: The Data Queue server daemon is started in the QSYSWRK subsystem. The daemon job is named QZHQSRVD. The associated server job is named QZHQSSRV.
*FILE: The file server daemon is started in the QSERVER subsystem. The daemon job is named QPWFSERVSD. The associated server jobs are named QPWFSERVSO, QPWFSERVSS, and QPWFSERVS2.
*NETPRT: The network print server daemon is started in the QSYSWRK subsystem. The daemon job is named QNPSERVD. The associated server jobs are named QNPSERVS and QIWVPPJT.
*RMTCMD: The remote command and distributed program call server daemon is started in the QSYSWRK subsystem. The daemon job is named QZRCSRVSD. The associated server job is named QZRCSRVS.
*SIGNON: The signon server daemon is started in the QSYSWRK subsystem. The daemon job is named QZSOSGND. The associated server job is named QZSOSIGN.
*SVRMAP: The server mapper daemon is started in the QSYSWRK subsystem. The daemon job is named QZSOSMAPD.
Optional Parameters
- RQDPCL
- Specifies which communication protocols are required to be active for the host server daemons to start.
Single Values
*ANY: The TCP/IP communication protocol must be active at the time the STRHOSTSVR command is issued. If TCP/IP is not> active, escape message PWS300D will be issued and the host server daemons will not be started. A diagnostic message (PWS3008) will be issued if TCP/IP is found to be inactive.
*NONE: No communication protocols need to be active at the time the STRHOSTSVR command is issued for the host server daemons to start. No messages will be issued for protocols which are inactive.
*TCP: The TCP/IP communication protocol must be active at the time the STRHOSTSVR command is issued. If TCP/IP is not active, diagnostic message PWS3008 and escape message PWS300D will be issued and the host server daemons will not be started.
Examples for STRHOSTSVR
Example 1: Starting All Host Server Daemons
STRHOSTSVR SERVER(*ALL)This command starts all of the server daemons and the server mapper daemon, as long as at least one communication protocol is active.
Example 2: Starting Specific Server Daemons
STRHOSTSVR SERVER(*CENTRAL *SVRMAP) RQDPCL(*NONE)This command starts the central server daemon and the server mapper daemon in the QSYSWRK subsystem, even if no communication protocols are active.
Example 3: Specifying One Required Protocol
STRHOSTSVR SERVER(*ALL) RQDPCL(*TCP)This command starts all of the host server daemons and the server mapper daemon, as long as the TCP/IP communications protocol is active.
Error messages for STRHOSTSVR
*ESCAPE Messages
- PWS300D
- Unable to start host server daemon jobs.
- PWS3006
- Errors occurred starting server daemon jobs.