CL Command Reference - STRTCPSVR

CL Command List > STRTCPSVR Reference

Description:

The Start TCP/IP Server (STRTCPSVR) command is used to start the TCP/IP application servers that are shipped with the operating system or the TCP/IP product. The number of server jobs started by this command is specified, where appropriate, in the configuration for each TCP/IP application.

The STRTCPSVR command can only be used when TCP/IP is fully operational. The interface server job, QTCPIP, must be available. If TCP/IP processing was started by running the STRTCP (Start TCP/IP) command when the system was in restricted state, the STRTCPSVR command will fail.

All servers have an autostart (AUTOSTART) parameter on the associated configuration command (for example, Change FTP Attributes (CHGFTPA)). This parameter indicates if the server should be started when the Start TCP/IP (STRTCP) command is entered. The STRTCPSVR command ignores the value of a server¡¯s autostart attribute, unless *AUTOSTART is specified for the Server application (SERVER) parameter. If a server has *YES for the AUTOSTART attribute, then the STRTCPSVR command will start the server when SERVER(*AUTOSTART) is specified. Additional servers can automatically be added to list of servers that STRTCPSVR will support by using the ADDTCPSVR (Add TCP/IP Server) CL command

Restrictions:

. This command is conditionally threadsafe. This command calls different programs to process each type of TCP/IP server. If the programs being called are threadsafe, this command is threadsafe.


Examples:

Example 1: Starting All TCP/IP Servers with AUTOSTART(*YES)

STRTCPSVR SERVER(*AUTOSTART)

This command starts all of the TCP/IP application servers that have the AUTOSTART attribute in the application configuration set to *YES.



Example 2: Starting All TCP/IP Servers

STRTCPSVR SERVER(*ALL)

This command starts all of the TCP/IP application servers that have been configured. For example: If the Change FTP Attributes (CHGFTPA) command was previously used to configure two FTP servers, both servers are started when STRTCPSVR is issued. This example is also true for other TCP/IP application servers.



Example 3: Starting the TELNET Server

STRTCPSVR SERVER(*TELNET)

This command starts the TCP/IP TELNET application server. If the TELNET server was previously started, one additional TELNET server job is started.



Example 4: Restarting the HTTP Server

STRTCPSVR SERVER(*HTTP) RESTART(*HTTP)

This command restarts the TCP/IP HTTP application server for all instances of the HTTP server. If the HTTP server was not currently running, then all defined instances of the HTTP server would be started.



Example 5: Starting an HTTP Server Instance

STRTCPSVR SERVER(*HTTP) HTTPSVR(¡¯http1¡¯)

This command starts the TCP/IP HTTP application server instance named ¡¯http1¡¯ using the startup values previously defined for this server instance.



Example 6: Specifying Startup Values for an HTTP Instance

STRTCPSVR SERVER(*HTTP) HTTPSVR(HTTP1 ¡¯-p 81 -sslport 443¡¯)

This command starts the TCP/IP HTTP application server instance named HTTP1, and specifies that the server instance should listen on port 81 for unsecure requests and on port 443 for secure requests. The ports defined here will override any previously defined ports to be used by this server instance.



Example 7: Starting a DNS Server Instance

STRTCPSVR SERVER(*DNS) DNSSVR(¡¯dns1¡¯)

This command starts the TCP/IP DNS application server instance named ¡¯dns1¡¯ using the startup values previously defined for this server instance.



Example 8: Specifying Startup Values for a DNS Instance

STRTCPSVR SERVER(*DNS) DNSSVR(DNS1 ¡¯-d 5¡¯)

This command starts the TCP/IP DNS application server instance named DNS1, and specifies that the server instance should turn on debug level 5.