Starting the servers

About this task

Servers are started using the STRTCPSVR *ONDMD command. The INSTANCE parameter of the STRTCPSVR *ONDMD command supports the special values of *DFT, *ALL, and *AUTOSTART, as well as the specification of the name of an instance. (An instance is set to autostart if the ARS.CFG file for that instance contains ARS_AUTOSTART_INSTANCE=1.) The default value for the INSTANCE parameter is *DFT. You can also create a data area named STRTCPSVR to further control the behavior of the STRTCPSVR command. See the Content Manager OnDemand for i: Administration Guide for more details about the data area.

Without the STRTCPSVR data area, the values of *DFT and *AUTOSTART work identically. All instances that are set to autostart are started. Use of the special value *ALL starts all instances configured on the system. You can also specify the name of a single instance to start, for example: STRTCPSVR SERVER(*ONDMD) INSTANCE(ONDTEST).

With the data area, the value of *DFT starts only the instance named in the data area. The data area must be named STRTCPSVR and located in library QUSRRDARS. The data area should be type character with a length of 10. To create the data area, use the command:
CRTDTAARA DTAARA(QUSRRDARS/STRTCPSVR) TYPE(*CHAR) LEN(10) VALUE(QUSROND) 
TEXT('Autostart instance name for STRTCPSVR *ONDMD *DFT')
where QUSROND is the name of the instance to start.

The special values *ALL and *AUTOSTART work the same with the data area as without the data area.

To determine the instances that are started when STRTCPSVR SERVER(*ONDMD) INSTANCE(*AUTOSTART) is executed, you can look for the ARS_AUTOSTART_INSTANCE=1 in the ARS.CFG file. However, there is an easier way, so that you do not have to check the ARS.CFG file for every instance.

Use the
grep 
command in qshell to search the contents of all the ARS.CFG files for the string ARS_AUTOSTART_INSTANCE=1. For example:
$
grep -n 'ARS_AUTOSTART_INSTANCE=1' /qibm/userdata/ondemand/*/ars.cfg
/qibm/userdata/ondemand/ONDDEMO/ars.cfg:53:ARS_AUTOSTART_INSTANCE=1
/qibm/userdata/ondemand/ONDDEU/ars.cfg:53:ARS_AUTOSTART_INSTANCE=1
/qibm/userdata/ondemand/ONDENU/ars.cfg:53:ARS_AUTOSTART_INSTANCE=1
/qibm/userdata/ondemand/QUSROND/ars.cfg:53:ARS_AUTOSTART_INSTANCE=1
$

From the output of this command, you can determine that instances ONDDEMO, ONDDEU, ONDENU, and QUSROND is started when STRTCPSVR SERVER(*ONDMD) INSTANCE(*AUTOSTART) is run.

The following table summarizes the behavior of the STRTCPSVR command with and without the STRTCPSVR data area.

Table 1. STRTCPSVR command with and without STRTCPSVR data area
  *DFT *ALL *AUTOSTART Named instance
Without the data area, running STRTCPSVR starts: All instances set to autostart All instances configured on the system All instances set to autostart The named instance
With the data area, running STRTCPSVR starts: Only the instance named in the data area All instances configured on the system All instances set to autostart The named instance