Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Configuration Guide


6.1.1 Settings for starting multiple scheduler services

Job groups are managed by the scheduler service. If multiple scheduler services are started, the scheduler services can be used to manage the job groups.

To start multiple scheduler services, you must first set information such as the names of the scheduler services to be added.

The following describes the procedures for adding and deleting scheduler services.

For details about how to add scheduler services to a logical host and how to delete scheduler services from a logical host, see 8.2.10 Setting startup of multiple scheduler services on a logical host.

Organization of this subsection

(1) Adding a scheduler service

To add a scheduler service:

  1. In Windows Control Panel, open the Services administrative tool, and stop the following service:

    • JP1/AJS3 service

    Important

    All embedded databases configured on the physical host must be operating. Make sure that the applicable JP1/AJS3 Database _JFn (n: 0 to 9 or A to Z) services are running. If any JP1/AJS3 Database _JFn services are not running, start them.

    Execute the ajsembdbstatus command with -s ust -id _JFn (n: 0 to 9 or A to Z) specified to confirm that the embedded database is operating (UNIT-STAT is ONLINE). If the database is not operating, use the ajsembdbstart command with -id _JFn specified to activate it.

    Execute the ajsembdbidlist command to check the setup identifier (_JFn) of the embedded database to be activated.

  2. Use Explorer or another means to create the following folders:

    • Database folder

    • Folder for temporary files

    • Job information folder

    • Backup information folder

    Make sure that the above folders, other than the backup information folder, are neither folders used by other scheduler services set on the local hosts (the physical host and all logical hosts) nor subfolders of those folders.

  3. Execute the jajs_setup command to add the scheduler service.

    jajs_setup -a -F scheduler-service
     -p service-for-the-port-reporting-the-job-status
     -d database-folder
     -t folder-for-temporary-files
     -j job-information-folder
     -b backup-information-folder
     -n scheduler-service-identification-number
     [[-I setup-identifier
       -P embedded-database-port-number]
      [-M {s|m|l}]
      [-B]
     |-S]

    Example of adding a scheduler service named AJSROOT2:

    jajs_setup -a -F AJSROOT2
     -p jp1ajs2report2
     -d "C:\Program Files\HITACHI\JP1AJS2\database\schedule\AJSROOT2"
     -t "C:\Program Files\HITACHI\JP1AJS2\tmp\schedule2"
     -j "C:\Program Files\HITACHI\JP1AJS2\jobinf2"
     -b "C:\Program Files\HITACHI\JP1AJS2\backup\schedule2"
     -n 2

    If you add a scheduler service to an embedded database whose installation directory has been changed from the default path, execute the jajs_setup command with the -S option specified.

    For details about the jajs_setup command, see jajs_setup in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

  4. Perform advanced setup for the embedded database.

    If you specified the -S option in step 3, perform advanced setup for the embedded database. For details about advanced setup for the embedded database, see 23.4 Advanced setup of an embedded database.

    If you have changed the embedded database installation directory from the default path, execute the ajsembdbsetup command. For details, see 23.4.1(5)(b) Setting up multiple scheduler databases in one embedded database environment.

  5. Open the following file with a text editor such as Notepad:

    system-folder\system32\drivers\etc\Services
  6. For the service name of the port that reports the job status specified in step 3, set the port number.

    Example of setting 20248 as the port number:

       jp1ajs2report2   20248/tcp
    Important

    When you add a scheduler service to a physical host, make sure that the scheduler service does not use a port number that is used by another scheduler service that runs on the physical host. To use JP1/AJS3 in an environment with a Windows Firewall, register the port number you specified (in the above example, service name jp1ajs2report2 and port number 20248) in the Windows Firewall rules so that data will be able to pass through the firewall.

  7. If you want to use queueless jobs, you must perform the setup required for using queueless jobs.

    Execute the following command:

    ajsqlsetup [-F scheduler-service-name]

    For details about the ajsqlsetup command, see ajsqlsetup in 4. Commands Used for Special Operation in the manual JP1/Automatic Job Management System 3 Command Reference.

  8. Stop the embedded database.

    Stop the JP1/AJS3 Database _JFn service for the embedded database you started in Step 1.

  9. Restart the JP1/AJS3 service.

    The scheduler service is added and started with the specified settings.

    After the JP1/AJS3 service has been restarted, use JP1/AJS3 - View to confirm that the manager job group is displayed with the name of the added scheduler service attached.

Supplementary note on command execution:

When the scheduler service is adding, if you execute a command without specifying a scheduler service name in the -F option, the default scheduler service is assumed.

You can omit the -F option when the name of a scheduler service name is specified in the AJSCONF environment variable.

(2) Deleting a scheduler service that has been added

To delete a scheduler service that has been added:

  1. Stop the JP1/AJS3 services.

    Stop all JP1/AJS3 services, including the JP1/AJS3 - Manager services, on logical hosts.

    Important

    All embedded databases configured on the physical host must be operating. Make sure that the applicable JP1/AJS3 Database _JFn (n: 0 to 9 or A to Z) services are running. If any JP1/AJS3 Database _JFn services are not running, start them.

    Execute the ajsembdbstatus command with -s ust -id _JFn (n: 0 to 9 or A to Z) specified to confirm that the embedded database is operating (UNIT-STAT is ONLINE). If the database is not operating, use the ajsembdbstart command with -id _JFn specified to activate it.

    Execute the ajsembdbidlist command to check the setup identifier (_JFn) of the embedded database to be activated.

  2. Execute the following jajs_setup command to delete the scheduler service.

    jajs_setup -e -F scheduler-service-name

    Example of deleting the AJSROOT2 scheduler service:

    jajs_setup -e -F AJSROOT2

    For details about the jajs_setup command, see jajs_setup in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

  3. Delete the folder that was created when the scheduler service was added.

    Delete the following folders that were created when you executed the jajs_setup command:

    • Database folder specified in the -d option

    • Folder for temporary files specified in the -t option

    • Job information folder specified in the -j option

    • Backup information folder specified in the -b option

  4. If a trace log has been output per scheduler service, delete the trace log file for the deleted scheduler service.

    If yes is set in the TRACELOGDIV environment setting parameter, a trace log is output for individual scheduler services. In that case, trace log files are output with the name tracelog_scheduler-service-name to the folder specified in the TRACELOGDIVDIR environment setting parameter. Therefore, delete the trace log file for the deleted scheduler service.

  5. Stop the embedded database.

    Stop the JP1/AJS3 Database _JFn services for all embedded databases.

  6. Restart the JP1/AJS3 service.

    Restart the services you stopped in Step 1, and make sure that the scheduler service has been deleted.

(3) Uninstalling an unnecessary database environment

To uninstall a database environment that is no longer necessary:

  1. Execute the ajsembdbidlist command to identify the embedded databases that are not being used by any scheduler services.

    Execute the following command:

    ajsembdbidlist

    For details about the ajsembdbidlist command, see ajsembdbidlist in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

  2. Execute the ajsembdbuninstl command to uninstall an embedded database that is not being used by any scheduler services.

    Execute the following command:

    ajsembdbuninstl -id setup-identifier

    When uninstalling an embedded database environment associated with version 8 or earlier, follow the uninstallation procedure described in the manual for that product version.

    When uninstalling such an embedded database environment in UNIX, execute the ajsembdbunset command, and then the following command:

    /opt/HiRDB_J/bin/pdesetup -u embedded-database-practical-directory

    The embedded databases listed below contain information necessary for the system. Do not specify the setup identifiers of these databases in the -id option.

    • Embedded database whose setup identifier is _JF0

    • The embedded database set up first on the host when the setup identifier has been changed to a setup identifier other than _JF0 by performing any of the following operations: (1) migrating data needed for advanced setup of the embedded database, (2) advanced setup of the embedded database, or (3) performing setup again for the embedded database

    • An embedded database set up with the setup identifier specified in the -I option of the jajs_setup_cluster command in an environment in which logical hosts have been created

    For details about the ajsembdbuninstl command, see ajsembdbuninstl in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

    For details about the jajs_setup_cluster command, see jajs_setup_cluster in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

(4) Renaming a scheduler service

Renaming a scheduler service affects many types of JP1/AJS3 functions. For example, a unit might end abnormally or might not be executed properly. To prevent such problems, we recommend that you rename a scheduler service before operation starts.

The following describes how to rename a scheduler service before and after operation starts.

(a) How to rename a scheduler service before operation starts

To rename a scheduler service before operation starts:

  1. Execute the jajs_setup command to rename the scheduler service.

    Execute the following command:

    jajs_setup -r -F scheduler-service-name-before-the-change -A new-scheduler-service-name

    For details about the jajs_setup command, see jajs_setup in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

(b) How to rename a scheduler service after operation starts

To rename a scheduler service after operation starts:

  1. Stop the scheduler service to be renamed, and then cold-start the scheduler service.

    After the cold-start, do not register a jobnet for execution until the renaming procedure is finished.

  2. Stop the JP1/AJS3 services on the physical host and all logical hosts.

  3. Execute the jajs_setup command to rename the scheduler service.

    Example: To change AJSROOT2 to AJSROOT5:

    jajs_setup -r -F AJSROOT2 -A AJSROOT5

    If the KAVS1133-W message is not output during execution of the jajs_setup command, skip step 4 and step 5 and go to step 6.

    If the KAVS1133-W message is output during execution of the jajs_setup command, check the setting name indicated in the message. If Local date and time is indicated, go to step 4. If Suspend feature is indicated, go to step 5, and then proceed to step 6.

    Cautionary note:

    Before you rename a scheduler service for which the local date and time is set, obtain the difference between the local date and time for the scheduler service and the system date and time. Use the ajslocaldate command to obtain the scheduler service local date and time.

    For details about how to obtain the system date and time, see the documentation for your OS.

    If an attempt to set the scheduler service local date and time fails and the KAVS1133-W message appears, use the time difference obtained above to set the scheduler service local date and time in step 4.

  4. Set the scheduler service local date and time again.

    Execute the ajslocaldate command to set the scheduler service local date and time for the renamed scheduler service.

    Example: To set the local date and time for the scheduler service AJSROOT5 forward five minutes (300 seconds) from the current time, execute the command as follows:

    ajslocaldate -F AJSROOT5 -s 300

    For details about the ajslocaldate command, see ajslocaldate in 4. Commands Used for Special Operation in the manual JP1/Automatic Job Management System 3 Command Reference.

  5. Set the suspend function again.

    Execute the ajssetup command to enable the suspend function for the renamed scheduler service.

    Example: To enable the suspend function for the scheduler service AJSROOT5, execute the command as follows:

    ajssetup -F AJSROOT5 -m

    For details about the ajssetup command, see ajssetup in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

  6. If the scheduler service name before the change is set for the following environment setting parameters, use the jajs_config command to change them to the new scheduler service name.

    Table 6‒1: Environment setting parameters whose settings need to be changed

    Definition key

    Environment setting parameter

    Explanation

    [JP1_DEFAULT\JP1AJSMANAGER]

    "DEFAULTSERVICENAME"=

    Default scheduler service name

    "REMNETSERVICENAME"=

    Name of the scheduler service that executes a remote jobnet

    Example: To change the default scheduler service name to AJSROOT5, execute the command as follows:

    jajs_config -k [JP1_DEFAULT\JP1AJSMANAGER] "DEFAULTSERVICENAME"="AJSROOT5"

    Example: To change the name of the scheduler service that executes remote jobnets to AJSROOT5, execute the command as follows:

    jajs_config -k [JP1_DEFAULT\JP1AJSMANAGER] "REMNETSERVICENAME"="AJSROOT5"

  7. If a trace log has been output per scheduler service, change the name of the trace log file used for each scheduler service before changing the scheduler service name.

    If yes is set in the TRACELOGDIV environment setting parameter, a trace log is output for individual scheduler services. In that case, trace log files are output with the name tracelog_scheduler-service-name to the folder specified in the TRACELOGDIVDIR environment setting parameter. Therefore, change the scheduler-service-name part from the scheduler service name before the change to the new scheduler service name.

  8. Start the JP1/AJS3 services.

  9. In either of the following cases, after the scheduler services start, change or set the scheduler service settings if necessary:

    • The scheduler service name before the change is specified in the unit definition.

    • The JP1/AJS3 linkage facility was monitoring or collecting information from the scheduler service before it was renamed.

(c) Notes on renaming scheduler services

The following environment setting parameters for scheduler services use the directory path that contains the scheduler service name as a standard:

  • AJSSYSDIR

  • AJSLOGDIR

  • AJSDBDIRECTORY

  • AJSLOGFILE1

  • AJSLOGFILE2

Operation is not affected even if the environment setting parameters are not changed after the scheduler service is renamed. However, if necessary, consider changing the directory path that contains the new scheduler service name.

When you change the setting of the AJSDBDIRECTORY environment setting parameter in an environment using the suspend function or queueless jobs, you must set up the suspend or queueless job function again after changing the parameter setting.

Use the jajs_config command to change the environment setting parameters. For details about the jajs_config command, see jajs_config in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

For details about the parameters, see 20.4 Setting up the scheduler service environment.