Job Management Partner 1/Automatic Job Management System 3 Command Reference 2
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-nameFormat 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:
- Adding a scheduler service
- Renaming a scheduler service
- Deleting a scheduler service
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:
- When the specified value is outside the valid range
- When the specified ID number is already used by the physical host or any logical host of the local host
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:
- When the specified value is outside the valid range
- When startup of multiple scheduler services is enabled, the names of the scheduler services are different but port numbers defined in the services file are duplicate
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:
- When the specified value is outside the valid range
- When the specified directory does not exist
- When the specified directory name is already used as the name of a database directory on the physical host or any logical host of the local host
- When the specified database directory name ends with a path separator
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:
- When the specified value is outside the valid range
- When the specified directory name is already used as the name of a temporary directory on the physical host or any logical host of the local host
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:
- When the specified value is outside the valid range
- When the specified directory name is already used as the name of a job information directory on the physical host or any logical host of the local host
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
- Do not execute this command more than once in quick succession.
- Do not terminate the command forcibly.
- Before you use this command to rename or delete a scheduler service, make sure that the scheduler service has stopped. If the scheduler service is running, the command terminates abnormally.
You do not need to stop any services other than the target scheduler service.
- Before you use this command to add or delete a scheduler service, check the status of the embedded database. If you execute the command without checking the status, the command might terminate abnormally.
The following describes how to check the status of an embedded database.
- In Windows:
- Make sure that all JP1/AJS3 Database _JFn (n: 1 to 9 or A to Z) services are started.
Note that the setup identifiers of embedded databases for which these services are to be started are the setup identifiers displayed by executing the ajsembdbidlist command.
- For each of the setup identifiers displayed by the ajsembdbidlist command, execute the ajsembdbstatus command with the -s ust -id _JFn (n: 1-9 or A-Z) options specified to confirm that the embedded database is running (UNIT-STAT is ONLINE). If the embedded database is not running, execute the ajsembdbstart command with the -id _JFn option specified.
- In UNIX:
- For each of the setup identifiers displayed by the ajsembdbidlist command, execute the ajsembdbstatus command with the -s ust -id _JFn (n: 1-9 or A-Z) options specified to confirm that the embedded database is running (UNIT-STAT is ONLINE). If the embedded database is not running, execute the ajsembdbstart command with the -id _JFn option specified.
- Even during JP1/AJS3 service operation, you can add a scheduler service, or if you choose, you can stop a scheduler service and either remove or rename that scheduler service. Note, however, that the changed scheduler service configuration will take effect only when the JP1/AJS3 service is started the next time. For the procedure for changing the scheduler service configuration according to the operating requirements, see the following manual sections:
- In Windows:
- 6.1.1 Settings for starting multiple scheduler services in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 1
- In UNIX:
- 14.1.1 Settings for starting multiple scheduler services in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 1
- If Windows Firewall is used, a pop-up message might be displayed during setup processing. If a pop-up message is displayed, registration in the Windows Firewall exceptions list is required. Take action by referring to the notes on the ajsembdbinstl command.
- The command can be executed only when the specified logical host name can be resolved into an IP address.
- The command might terminate abnormally, outputting the following message: Database maintenance failed (func code=xx, error code=yy). If this message is output, take appropriate action according to the following table.
Value of xx Action 1 Correct the error indicated in the message output before this message according to the action to be taken if an error occurs in the ajsembdbbuild command. Then re-execute the command. 2 Correct the error indicated in the message output before this message according to the action to be taken if an error occurs in the ajsembdbsetup command. Then re-execute the command. 3 Correct the error indicated in the message output before this message according to the action to be taken if an error occurs in the ajsembdbunset command. Then re-execute the command. 4 Correct the problem according to the error message output before this message, and then re-execute the command. 5 Check 2.8.8(1) Action to be taken if an error occurs during embedded database maintenance in the manual Job Management Partner 1/Automatic Job Management System 3 Troubleshooting for error code yy in the output message, and correct the problem. 6 Check 2.8.8(2) Action to be taken if an error occurs during installation of the embedded database in the manual Job Management Partner 1/Automatic Job Management System 3 Troubleshooting for error code yy in the output message, and correct the problem. 7 Check 2.8.8(3) Action to be taken if an error occurs during uninstallation of the embedded database in the manual Job Management Partner 1/Automatic Job Management System 3 Troubleshooting for error code yy in the output message, and correct the problem. - On the standby host in a cluster configuration, you cannot use the jajs_setup command to add or remove a scheduler service.
If you want to perform these operations on the standby host, use the applicable JP1/Base commands. The procedures are as follows.
- To add a scheduler service:
- On the executing host, execute the following command to export the configuration definition of the logical host to a file:
jbsgetcnf -h logical-host-name > output-file-name
- On the standby host, execute the following command to import the file you created in step 1:
jbssetcnf output-file-name
- To remove a scheduler service:
- On the standby host, execute the following command:
jbsunsetcnf -h logical-host-name -c "JP1AJSMANAGER\scheduler-service-name"
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
To rename a scheduler service after operation has started:
- 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.
- Stop the JP1/AJS3 service.
- 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
- Execute the jajs_setup command to rename the scheduler service.
If the KAVS1133-W message is not output during execution of the jajs_setup command, go to step 7.
- For example, if you change the name from AJSROOT2 to AJSROOT5, execute the following command:
- jajs_setup -r -F AJSROOT2 -A AJSROOT5
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.
- 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
- 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
- (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
- Start the JP1/AJS3 service.
- 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:
- scheduler service name: AJSROOT2
- scheduler service ID number: 2
- name of the service for the port reporting the job status: jp1ajs2report2
- database directory name: /var/opt/jp1ajs2/database/schedule/AJSROOT2
- temporary directory name: /var/opt/jp1ajs2/tmp/schedule2
- job information directory name: /var/opt/jp1ajs2/jobinf2
- job information directory name: /var/opt/jp1ajs2/backup/schedule2
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:
- scheduler service name: AJSROOT3
- scheduler service ID number: 3
- name of the service for the port reporting the job status: jp1ajs2report3
- database directory name: H:\JP1LHOST\jp1ajs2\database\schedule\AJSROOT3
- temporary directory name: H:\JP1LHOST\jp1ajs2\tmp\schedule3
- job information directory name: H:\JP1LHOST\jp1ajs2\jobinf3
- job information directory name: H:\JP1LHOST\jp1ajs2\backup\schedule3
- logical host shared directory name: H:\JP1LHOST
- setup identifier: _JFA
- embedded database port number: 22250
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
Copyright (C) 2009, 2010, Hitachi, Ltd.
Copyright (C) 2009, 2010, Hitachi Solutions, Ltd.