Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Command Reference


jajs_maintain

Organization of this page

Format

jajs_maintain
     [-h logical-host-name]
     [-F scheduler-service-name]
     {-m {manager|scheduler}|-show|-r start}
     [-x degree-of-parallelism]
     [-c disconnection-status-monitoring-time]

Description

The jajs_maintain command performs maintenance of the JP1/AJS3 ISAM database.

Execution privileges

In Windows: Administrators privileges

In UNIX: Superuser privileges

Arguments

-h logical-host-name

Specify the target logical host in a cluster operation that will be placed in the maintenance mode.

By default, the system assumes the logical host name specified by the JP1_HOSTNAME environment variable. Without the JP1_HOSTNAME environment variable, however, the system assumes the local host name.

1 to 255 bytes of characters can be specified.

-F scheduler-service-name

Specify the name of the target scheduler service that will be placed in the maintenance mode. In the scheduler service reduction mode, maintenance will apply to only the service specified with this option.

By default, all scheduler services subordinate to the physical host or logical host will be placed in the reduction mode.

If you specify this option with the manager functionality reduction mode, the command will end abnormally.

1 to 30 bytes of characters can be specified.

-m {manager|scheduler}

Specify the maintenance mode.

  • manager

    Performs maintenance in the manager functionality reduction mode.

    • For standard configuration:

      The job execution environment is subject to maintenance.

    • For compatible ISAM configuration:

      The job execution environment and scheduler service are subject to maintenance.

    You can specify this option with the -h option.

  • scheduler

    Performs maintenance in the scheduler service reduction mode.

    • For standard configuration:

      Nothing is subject to maintenance.

    • For compatible ISAM configuration:

      The scheduler service is subject to maintenance.

    You can specify this option with the -h and -F options.

For notes on each maintenance mode, see 7.1.3(3)(c) Notes on maintenance mode in the JP1/Automatic Job Management System 3 System Design (Configuration) Guide.

-show

Displays the operating status of the job execution environment. This option cannot be specified together with the -m, -r, -x, or -c option.

One of the following is output as the status of the job execution environment:

  • active: Operation of JP1/AJS3 has started.

  • inactive: Operation of JP1/AJS3 has stopped.

  • Now starting: Operation of JP1/AJS3 is being started.

  • Planned terminating: Operation of JP1/AJS3 is undergoing a planned stop.

  • Now terminating: Operation of JP1/AJS3 is being stopped.

  • Maintenance: Maintenance is being performed on the operation of JP1/AJS3.

-r start

If the job execution environment and the scheduler service remain in the maintenance status because the processing of the jajs_maintain command is canceled for whatever reason, this option restores them to operating status.

If you simultaneously specify the -F option, only the job execution environment and the specified scheduler service are restored to operating status.

If the target job execution environment and scheduler service are being maintained elsewhere, this command ends abnormally. If the target job execution environment and scheduler service are inactive or are being used, no restoration is performed even if you execute this command. In such a case, the command ends normally.

Do not specify this option together with the -m, -show, -x, or -c option.

-x degree-of-parallelism

Specify the number of concurrent scheduler services for which reorganization should be performed. You can specify 1 to 20.

-c disconnection-status-monitoring-time

Specify how long the system will monitor for disconnection from the scheduler database when the manager functionality enters the reduction mode. The system will monitor for disconnection at intervals of 10 seconds within the specified period of time.

You can set 0 to 86,400 (seconds). The default is 60 seconds.

Notes

  1. During maintenance of the job execution environment, you cannot execute job entry and execution commands. Using such commands causes an error message KAVU0950-E to appear in the standard error output file.

  2. If you attempt to operate a unit from JP1/AJS3 - View during maintenance of scheduler service, a KAVV461-E The connection is not possible because the specified scheduler service is under maintenance. message appears in the message box.

    When you execute a command that manipulates a unit, a KAVS1717-E Maintenance is being performed, so execution is impossible message is output to the standard error output.

  3. When the jajs_maintain command is executed, log data about reorganization is output to the maintenance log file.

    If maintenance processing terminates abnormally, check the maintenance log file for the cause of the abnormal termination, correct the cause, and then re-execute the maintenance processing.

    For the location of the maintenance log file, see the description of the maintenance log file in 1.2.5 List of log files and directories in the manual JP1/Automatic Job Management System 3 Troubleshooting.

  4. If you stop the JP1/AJS3 service when the manager functionality is reduced, information about any jobs for which the status has changed during the reduction period will be lost. Do not stop JP1/AJS3 when the manager functionality is reduced.

  5. If you execute the command in the manager functionality reduction mode when JP1/AJS3 is stopped, the command will require long time to terminate.

  6. If the processing of the jajs_maintain command is canceled for whatever reason when the scheduler service to be maintained is being used, the scheduler service and the event action control manager might remain in maintenance status. To restore them, you must use the jajs_maintain -r start, ajsstart, or jajs_spmd command to start the applicable service.

    In the above situation, the job execution environment might remain in maintenance status as well. To restore it, execute jajs_maintain -r start, or restart the JP1/AJS3 service.

  7. If you specify any of the following options in the jajs_maintain command, do not execute multiple instances of the command:

    • -m manager

    • -m scheduler

    • -r start

  8. If you specify the -m manager option in the jajs_maintain command, do not concurrently execute the command and the following command or script:

    • The jpqdbcond command with the -x or -k option specified

    • The jpqautocond script

  9. You cannot specify -m manager if any command or API for the job execution environment is still running.

  10. You cannot specify -m manager while job information is being deleted in the job execution environment.

    If maintenance is performed in the manager functionality reduction mode while job information is being deleted, job information deletion processing is interrupted until the maintenance is completed. The processing is resumed when the maintenance is completed.

  11. You cannot specify jajs_maintain -m manager while JP1/AJS3 is starting or finishing. You cannot start or finish JP1/AJS3 while jajs_maintain -m manager is executing.

  12. If you specify the -m manager option in the jajs_maintain command, do not concurrently execute the command and the jpqexport command.

  13. If you specify either of the following options in this command, do not concurrently execute the command and the ajsautocond script:

    • -m manager

    • -m scheduler

  14. If the jajs_maintain -show or jajs_maintain -r start command is executed while starting or finishing JP1/ JP1/AJS3, messages KAVU2227-E, KAVU0215-E, or KAVU0220-E might be output in the integrated log. These messages, which are output when maintenance operation conflicts with start or finish processing of the JP1/AJS3 service, do not pose a problem for actual operation. However, execution of the jajs_maintain command might take more time. If the command terminates abnormally, re-execute the command.

  15. When maintenance of the scheduler service is attempted, the scheduler service is stopped after all existing job execution requests are completed. Therefore, if the max number of simultaneous jobs is set as 0 and the max number of waiting jobs is set more than 1 in the queueless job execution environment settings, the jajs_maintain command cannot terminate because the scheduler service cannot start finish processing when the maintenance mode is entered while the queueless job is starting. The jajs_maintain command should be executed in a status that allows jobs to execute. If fall into this status, set the max number of simultaneous jobs more than 1 by the ajsqlalter command, and execute the jobs.

  16. For notes on maintenance of the scheduler service that is executing event jobs (including jobs specified in start conditions), see 7.6.8 Notes on restarting the JP1/AJS3 service while event jobs are running in the JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide.

Return values

0

Normal end

Other than 0

Abnormal end

Example

To perform maintenance periodically, you can define and execute the jajs_maintain command as a JP1/AJS3 job.

Suppose you reorganize the database in the manager functionality reduction mode at 23:00 on the last open day in December every year. You can use the following unit definition parameter to define a jobnet and register planned execution. The following shows examples for Windows and UNIX: