Starting and Stopping Service Manager on UNIX, OS/400, and z/OS

In this section:

If you are running on Windows, go to Class Path and Service Manager Restart Issues.

Shell scripts are installed with iWay to run Service Manager on UNIX, OS/400, and z/OS systems. The shell scripts require that the JAVA command be in your $PATH environment variable. Environment variables must be set for the user IDs that start Service Manager as explained in the iWay Installation and Configuration Version 5 Release 5 SM manual.

The following are ways to run Service Manager:

Note: Running Service Manager normally refers to running the base configuration unless another configuration is specifically mentioned. When you installed Service Manager, a base configuration of Service Manager was created and this is used by default. Also note the following:


Top of page

x
Starting and Stopping Service Manager as a Service (Daemon)

When you run Service Manager as a service (daemon), it runs in the background as the user ID specified in its start-up and shut-down scripts. Shell scripts to start and stop Service Manager as a service (daemon) are in the iWay60/bin directory.

The start-up script is:

iWay60/bin/startservice.sh

On UNIX and OS/400, the shut-down script is:

iWay60/bin/stopservice.sh

On z/OS, the shut-down script is:

iWay60/bin/stopservice.sh

Note: On z/OS, these scripts must be EBCDIC.

The scripts set several environment variables. On UNIX and OS/400, the installation program sets them for you. You can edit the scripts if you wish to change these settings. On z/OS, you must manually edit the scripts to set the following variables.

IWAY60SM

Is the location where you installed iWay 6.0.1 SM.

IWAYUSER

Is the user ID under which Service Manager runs. When you run the scripts as a non-super user ID (not root), you are prompted for the user ID password. On most UNIX systems, the default is root. For security reasons, you may decide not to run Service Manager as root.

IWAYCONFIG

Is the configuration to run. This is set to base by default.

The scripts also specify the log file for the service. By default these are:

iWay60/serviceOut.txt
iWay60/serviceShutdown.txt

If you create copies of the start-up and shut-down scripts in order to run multiple configurations, ensure each script has a unique log file.

Note: If the JAVA command is in your $PATH variable, you usually are not required to set it in the script. However, if you run into problems, edit the script so that the full path to the JAVA command appears instead of "java."



x
Procedure: How to Start Service Manager as a Service (Daemon)

To start Service Manager as a service (daemon):

  1. Navigate to the iWay60/bin directory, for example:
    /opt/iWay60/bin
  2. Execute the service start-up file, for example:
    ./startservice.sh

    If you are not a super user, you are prompted for the password of the user ID under which Service Manager runs.

    Password:
  3. Type the password for this user ID.

    The base configuration of Service Manager is started in the background and includes SOAP and HTTP listeners. A serviceOut.txt file appears in the iWay60 directory and contains log information.



x
Procedure: How to Stop Service Manager as a Service (Daemon)

To stop Service Manager as a service (daemon):

  1. Navigate to the iWay60/bin directory, for example:
    /opt/iWay60/bin
  2. Execute the service shut-down file, for example:
    ./stopservice.sh

    On z/OS, the service shut-down file might be named iWay60hutdown.sh.

    If you are not a super user, you are prompted for the password of the user ID under which Service Manager runs.

    Password:
  3. Enter the password for this user ID.

    Note: If you receive an error, ensure the user ID is defined in the shut-down file.

    A serviceShutdown.txt file appears in the iWay60 directory and contains log information about the shut-down process.


Top of page

x
Starting and Stopping Service Manager in the Shell

For debugging purposes, you can run Service Manager in the shell (or QSH) in an interactive and diagnostic (non-service) mode.



x
Procedure: How to Start Service Manager in the Shell

To run Service Manager in the shell as a non-service:

  1. Navigate to the iWay60 directory, for example:
    /opt/iWay60
  2. Start Service Manager by typing the following command:
    ./iWay60.sh configname

    where:

    configname

    Is the name of the Service Manager configuration you want to start.

    Service Manager starts and messages display information about the start-up process. When Service Manager has completely started, the following prompt appears:

    Enter command:>

    This prompt enables you to interact with Service Manager and displays diagnostic information about Service Manager processing.

    Caution: If you previously ran Service Manager as a service under a user ID such as root and then run Service Manager in the shell as a different user ID, you may encounter permission problems. Files created while Service Manager ran as a service may not be readable or writable to the user ID running Service Manager in the shell.



x
Procedure: How to Stop Service Manager in the Shell

To stop Service Manager running in the shell as a non-service:

  1. Go to the following Service Manager prompt:
    Enter command:>
  2. At the Service Manager prompt, type the following to stop listeners:
    stop
  3. When listeners have stopped, type the following:
    quit

Top of page

x
Starting and Stopping Service Manager as a Batch Process

On non-z/OS systems, go to Class Path and Service Manager Restart Issues.

On z/OS systems, you can also start Service Manager as a batch process using JCL.



Example: Starting Service Manager as a Batch Process on z/OS

The following sample JCL starts Service Manager in batch. Substitute the appropriate job card and HFS locations on your system.

//EDABGBPX JOB (SMITH),'JAVA BPXBATCH',CLASS=A,MSGLEVEL=(1,1),       
//   MSGCLASS=X,REGION=0M,NOTIFY=EDABG,USER=EDABG1,PASSWORD=XXXXXXX     //******************************************************************** //* RUN JAVA UNDER A UNIX SYSTEM SERVICE SHELL                          //******************************************************************** //STEP2 EXEC PGM=BPXBATSL,                                              
// PARM='PGM /bin/sh /u/edabg1/iWay60sm/iWay60.sh base -c'                //STDOUT DD SYSOUT=*                                                    
//STDERR DD SYSOUT=*                                                    
//STDENV DD *                                                           JAVA_HOME=/usr/lpp/java/J1.5                                            PATH=/usr/lpp/java/J1.5/bin                                     
//                                                                      


Example: Stopping Service Manager as a Batch Process on z/OS

The following sample JCL stops Service Manager in batch. Substitute the appropriate job card and HFS locations on your system.

//EDABGBPS JOB (SMITH),'JAVA BPXBATCH',CLASS=A,MSGLEVEL=(1,1),        
//   MSGCLASS=X,REGION=0M,NOTIFY=EDABG,USER=EDABG1,PASSWORD=XXXXXXX     //********************************************************************  //* RUN JAVA UNDER A UNIX SYSTEM SERVICE SHELL                          //********************************************************************  //STEP2 EXEC PGM=BPXBATSL,                                              
// PARM='PGM /bin/sh /u/edabg1/iWay60sm/bin/iWay60sd.sh'                  //STDOUT DD SYSOUT=*                                                    
//STDERR DD SYSOUT=*                                                    
//STDENV DD *                                                           PATH="/usr/local/diff/bin:.:/usr/lpp/java/J1.5/bin:/bin::/usr/local/bin /usr/local/subin:/usr/sbin"1.5/bin'                                     LIBPATH=/lib:/usr/lib:/usr/lpp/java/J1.5/bin:.                          JAVA_HOME=/usr/lpp/java/J1.5                                            
//                                                                     

iWay Software