Job Management Partner 1/Automatic Job Management System 3 Command Reference 2

[Contents][Glossary][Index][Back][Next]


jajs_setup

Format

jajs_setup
     [-F scheduler-service-name]
     {-a
     [-h logical-host-name]
      -n scheduler-service-ID-number
      -p service-for-the-port-reporting-the-job-status
      -d database-directory-name
      -t temporary-directory-name
      -j job-information-directory-name
      -b backup-information-directory-name
      [-D logical-host-shared-directory-name
       -I setup-identifier
       -P embedded-database-port-number] |
       -r -A new-scheduler-service-name |
      -e}

Format 1 (for adding a scheduler service)

jajs_setup
     -a
     [-h logical-host-name]
     [-F scheduler-service-name]
     -n scheduler-service-ID-number
     -p service-for-the-port-reporting-the-job-status
     -d database-directory-name
     -t temporary-directory-name
     -j job-information-directory-name
     -b backup-information-directory-name
     [-D logical-host-shared-directory-name
      -I setup-identifier
      -P embedded-database-port-number]

Format 2 (for renaming a scheduler service)

jajs_setup
     -r
     [-F scheduler-service-name]
     -A new-scheduler-service-name

Format 3 (for deleting a scheduler service)

jajs_setup
     -e
     [-F scheduler-service-name]
 

Description

The jajs_setup command performs setup of JP1/AJS3 scheduler services.

The following setup operations can be performed according to the specified option:

Execution privileges

In Windows: Administrators privileges

In UNIX: Superuser privilege

Arguments

-a

Specify this option to add a new scheduler service.

When this command is used to add a new scheduler service, the command also installs and sets up the database for the new scheduler service. You can use this command to create a new scheduler service easily.

After a scheduler service has been added normally, if you want to change an environment setting parameter for the scheduler service, execute the jajs_config command by specifying the following value for the -k option (definition key):

[{JP1_DEFAULT|logical-host}#1\JP1AJSMANAGER\scheduler-service#2]

#1
The specification of the {JP1_DEFAULT|logical-host} part depends on whether the host is a physical host or a logical host. For a physical host, specify JP1_DEFAULT. For a logical host, specify the logical host name.

#2
Specify the name of the new scheduler service you created.

You must specify this option with the -h, -F, -n,-p,-d,-t,-j and -b options. If you add a scheduler service to a logical host, you must also specify the -D, -I, and -P options.

If you specify the -a option, you cannot omit the -n, -p, -d, -t, -j, or -b options.

If a new embedded database needs to be created, the command execution requires several tens of minutes. A maximum of four scheduler services can be created for one embedded database. If an attempt is made to create more than this number, a new embedded database is created, and command execution will take some time.

Note that a maximum of four scheduler services are created for one embedded database even if the -u option was specified for the jajs_migrate command. If you want to specify the number of scheduler services created for one embedded database, use advanced setup of an embedded database. For details about the jajs_migrate command, see jajs_migrate in 2. Commands Used during Setup in this chapter. For details about advanced setup of an embedded database, see C. Advanced Setup of an Embedded Database in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 1.

-r

Specify this option to rename a scheduler service. The command renames a scheduler service on the host on which the command is executed regardless of whether the host is a physical host or a logical host.

You must specify this option with the -F and -A options. The -A option cannot be omitted.

Renaming of a scheduler service affects JP1/AJS3 functions. For example, a jobnet or job might terminate abnormally or might not operate correctly if a scheduler service is renamed after operation has started. Therefore, we recommend that you rename a scheduler service before operation starts.

If the KAVS1133-W message is output while a scheduler service is being renamed, the settings of the scheduler service are not transferred to the scheduler service that has the new name. In this case, after the scheduler service has been renamed, you must re-set the scheduler service local time or the suspend function.

Re-setting the scheduler service local time:
If the scheduler service local time was set before the scheduler service was renamed, you must execute the ajslocaldate command to set the scheduler service local time again for the renamed scheduler service.
For example, if you want to set the scheduler service local time on scheduler service AJSROOT5 to the time five minutes (300 seconds) ahead of the current host time, execute the following command:
ajslocaldate -F AJSROOT5 -s 300

Re-setting the suspend function:
If the suspend function was enabled before the scheduler service was renamed, you must execute the ajssetup command to enable the function again for the renamed scheduler service.
For example, if you want to enable the suspend function for scheduler service AJSROOT5, execute the following command:
ajssetup -F AJSROOT5 -m

For details about how to rename a scheduler service after operation has started, see Additional information below.

-e

Specify this option to delete a scheduler service. The command deletes a scheduler service on the host on which the command is executed regardless of whether the host is a physical host or a logical host.

When a scheduler service is deleted by this command, the scheduler database for the scheduler service is also deleted.

You must specify this option with the -F options.

-h logical-host-name

Specify this option if you want to specify a logical host name, instead of using the JP1_HOSTNAME environment variable.

You can specify a character string of 1 to 32 bytes.

The value of this option overrides the value of the JP1_HOSTNAME environment variable. By specifying JP1_DEFAULT as the value of this option, you can explicitly specify the physical host. You cannot use the computer name of the physical host to specify the physical host.

If you specify the -a option and omit the -h option, the value of the JP1_HOSTNAME environment variable is assumed.

If you specify both the -r and -e options and omit the -h option, the physical host is assumed. You cannot specify this option with the -r and -e option.

-F scheduler-service-name

Specify the name of the scheduler service for which you want to perform the desired operation (addition, renaming, or deletion).

You can specify a character string of 1 to 30 bytes.

If you omit this option, the system assumes the default scheduler service name.

-A new-scheduler-service-name

Specify the new scheduler service name that will be used for the renamed scheduler service.

You can specify a character string of 1 to 30 bytes.

You must specify this option with the -r options.

-n scheduler-service-ID-number

Specify a decimal number as the scheduler service ID number.

You can specify a value from 1 to 20.

The command outputs a message and terminates abnormally in the following cases:

You must specify this option with the -a options.

Make sure that the ID number you specify is not used by the physical host or any logical host of the local host.

The ID number specified in the -n option is used to internally identify a scheduler service as the name of a temporary file or as an inter-process communication key. Therefore, we recommend that you do not change an ID number after you have specified it. If you change an ID number, always cold-start the scheduler service.

-p service-for-the-port-reporting-the-job-status

Specify a service name defined in the services file as the number of the communication port to be used to acquire job status information.

You can specify a character string of 1 to 31 bytes.

The command displays a message and terminates abnormally in the following cases:

You must specify this option with the -a options.

-d database-directory-name

Specify the full path name of the directory that will contain JP1/AJS3 unit information.

You can specify a character string of 1 to 191 bytes.

Make sure that you do not add a path separator (\ in Windows, / in UNIX) at the end of the database directory name you specify.

The command displays a message and terminates abnormally in the following cases:

You must specify this option with the -a options.

-t temporary-directory-name

Specify the full path name of the directory in which JP1/AJS3 temporary files will be created.

You can specify a character string of 1 to 191 bytes.

If the specified directory does not exist, a warning message is displayed. Manually create the directory indicated in the warning message or use the jajs_config command to update the value of the AJSTMPDIR environment setting parameter. For the definition key to be specified in the jajs_config command, see the description of the -a option.

The command displays a message and terminates abnormally in the following cases:

You must specify this option with the -a options.

-j job-information-directory-name

Specify the full path name of the directory in which the standard error output file will be stored during job execution if the standard error output file is not specified during job definition.

You can specify a character string of 1 to 191 bytes.

If the specified directory does not exist, a warning message is displayed. Manually create the directory indicated in the warning message or use the jajs_config command to update the value of the JOBINFDIR environment setting parameter. For the definition key to be specified in the jajs_config command, see the description of the -a option.

The command displays a message and terminates abnormally in the following cases:

You must specify this option with the -a options.

-b backup-information-directory-name

Specify the full path name of the directory used for backing up units.

You can specify a character string of 1 to 191 bytes.

If the specified directory does not exist, a warning message is displayed. Manually create the directory indicated in the warning message or use the jajs_config command to update the value of the AJSBKUROOT environment setting parameter. For the definition key to be specified in the jajs_config command, see the description of the -a option.

If the specified value is outside the valid range, the command displays a message and terminates abnormally.

You must specify this option with the -a options.

-D logical-host-shared-directory-name

Specify the full path name of the directory shared by logical hosts when you add a scheduler service to a logical host.

You can specify a character string of 1 to 165 bytes.

You must specify this option with the -a options.

Always specify this option when you add a scheduler service to a logical host. If this option is omitted, the command terminates abnormally.

-I setup-identifier

When you add a scheduler service to a logical host, specify _JFn (n: 0 to 9 or A to Z) as the four-character setup identifier of the embedded database used on the logical host.

You must specify this option with the -a options.

Always specify this option when you add a scheduler service to a logical host. If this option is omitted, the command terminates abnormally.

-P embedded-database-port-number

When you add a scheduler service to a logical host, specify the port number used for the embedded database on the logical host.

You can specify a value from 5001 to 65535.

You must specify this option with the -a options.

Always specify this option when you add a scheduler service to a logical host. If this option is omitted, the command terminates abnormally.

Notes

Return values

0 to 9 Normal end
10 to 49 End with warning. The command terminated but requires manual operations.
50 or greater Abnormal end

Additional information

To rename a scheduler service after operation has started:

  1. Stop the scheduler service you want to rename, and then cold-start the scheduler service.
    After you have cold-started the scheduler service, do not register any jobnets for execution until the renaming is completed.
  2. Stop the JP1/AJS3 service.
  3. In UNIX, execute the ajsshmdel command to delete shared memory information.
    The ajsshmdel command is located in /opt/jp1ajs2/bin/ajsshmdel.

    Example:
    sh: /opt/jp1ajs2/bin/ajsshmdel >/dev/null 2>&1
    csh: /opt/jp1ajs2/bin/ajsshmdel >&/dev/null
  4. Execute the jajs_setup command to rename the scheduler service.

    For example, if you change the name from AJSROOT2 to AJSROOT5, execute the following command:
    jajs_setup -r -F AJSROOT2 -A AJSROOT5
    If the KAVS1133-W message is not output during execution of the jajs_setup command, go to step 7.
    If this message is output, perform either step 5 or step 6, whichever is appropriate for the setting name indicated in the message, and then go to step 7.

    Cautionary note
    If the scheduler service local time has been set for the scheduler service you want to rename, make sure that you obtain the difference between the scheduler service local time and the system time beforehand.
    You can use the ajslocaldate command (no option) to check the scheduler service local time.
    For the procedure for checking the system time, see the documentation for the OS being used.
    If the KAVS1133-W message is output because setting of the scheduler service local time has failed, use the difference you obtain to manually set the scheduler service local time for the renamed scheduler service.
  5. Set the scheduler service local time again.
    You must execute the ajslocaldate command to set the scheduler service local time again for the renamed scheduler service.

    For example, if you want to set the scheduler service local time on scheduler service AJSROOT5 to the time five minutes (300 seconds) ahead of the current host time, execute the following command:
    ajslocaldate -F AJSROOT5 -s 300
  6. Set the suspend function again.
    You must execute the ajssetup command to enable the function again for the renamed scheduler service.

    For example, if you want to enable the suspend function for scheduler service AJSROOT5, execute the following command:
    ajssetup -F AJSROOT5 -m
  7. (If the old scheduler service name has been set in the following environment setting parameters) Execute the jajs_config command to change the old name to the new name.
    Definition key: JP1_DEFAULT\JP1AJSMANAGER
    Environment setting parameters:
    Default scheduler service name: DEFAULTSERVICENAME
    Scheduler service name of the remote jobnet execution host: REMNETSERVICENAME

    In the following example, the command changes the default scheduler service name to AJSROOT5.
    jajs_config -k "[JP1_DEFAULT\JP1AJSMANAGER]" DEFAULTSERVICENAME=AJSROOT5

    In the following example, the command changes the scheduler service name of the remote jobnet execution host to AJSROOT5.
    jajs_config -k "[JP1_DEFAULT\JP1AJSMANAGER]" REMNETSERVICENAME=AJSROOT5
  8. Start the JP1/AJS3 service.
  9. If either of the following conditions applies, after the scheduler service is started, change or respecify the scheduler service settings as necessary:
    • The old scheduler service name is specified in the unit definition.
    • The old scheduler service name is used to set the scheduler service as the target of monitoring or information collection in the JP1/AJS3 linkage function.

Example 1

The command in this example adds a scheduler service to logical host lhost under the following conditions:

 
jajs_setup -a -h JP1_DEFAULT -F AJSROOT2 -n 2 -p jp1ajs2report2 
   -d "/var/opt/jp1ajs2/database/schedule/AJSROOT2"
   -t "/var/opt/jp1ajs2/tmp/schedule2"
   -j "/var/opt/jp1ajs2/jobinf2"
   -b "/var/opt/jp1ajs2/backup/schedule2"
 

Example 2

The command in this example adds a scheduler service to logical host lhost under the following conditions:

 
jajs_setup -a -h lhost -F AJSROOT3 -n 3 -p jp1ajs2report3 
   -d "H:\JP1LHOST\jp1ajs2\database\schedule\AJSROOT3"
   -t "H:\JP1LHOST\jp1ajs2\tmp\schedule3"
   -j "H:\JP1LHOST\jp1ajs2\jobinf3"
   -b "H:\JP1LHOST\jp1ajs2\backup\schedule3"
   -D "H:\JP1LHOST"
   -I _JFA
   -P 22250
 

Example 3

The command in this example changes the scheduler service name from AJSROOT2 to JP1AJS3001.

 
jajs_setup -r -F AJSROOT2 -A JP1AJS3001
 

Example 4

The command in this example deletes scheduler service AJSROOT2.

 
jajs_setup -e -F AJSROOT2

[Contents][Back][Next]


[Trademarks]

Copyright (C) 2009, 2010, Hitachi, Ltd.
Copyright (C) 2009, 2010, Hitachi Solutions, Ltd.