jajs_setup
- Organization of this page
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] [-M {s|m|l}] [-E {byte | sjis}]] | [-S] | -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] [-M {s|m|l}] [-E {byte | sjis}] | -S]
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:
-
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,-b,-I,-P,-M, and -S options. If you add a scheduler service to a logical host, you must also specify the -D option.
If you specify the -a option, you cannot omit the -n, -p, -d, -t, -j, or -b options.
If you add a scheduler service to a logical host, you cannot omit the -D, -I, and -P options.
If a new embedded database needs to be created, the command execution requires several tens of minutes. For a physical host, if the -I and -P options are omitted, the maximum number of scheduler services that can be created in an embedded database is four. If you create more than four scheduler services, another embedded database will need to be created and the command might take a long time to execute. When the -I option is specified, a scheduler service is created for the specified embedded database. Unless the setup identifier for a pre-configured embedded database is specified in the -I option, a new embedded database will need to be created and the command might take a long time to execute.
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 unit 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.
For the procedure for renaming a scheduler service, see the following sections:
- In Windows:
-
-
In a non-cluster environment
6.1.1(4) Renaming a scheduler service in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 1
-
In a cluster environment
8.2.7(4) Renaming a scheduler service in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 1
-
- In UNIX:
-
-
In a non-cluster environment
15.1.1(4) Renaming a scheduler service in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 1
-
In a cluster environment
17.2.7(4) Renaming a scheduler service in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 1
-
-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.
For details about the procedure for deleting a scheduler service in a logical host environment, see 8.2.7(2) Deleting an added scheduler service in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 1 (for Windows) or see 17.2.7(2) Deleting an added scheduler service in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 1 (for UNIX).
You must specify this option with the -F options.
-h logical-host-name
Specify the name of the logical host on which to set up the scheduler service.
You can specify a character string of 1 to 32 bytes.
The setup will be performed on the logical host specified in this option.
The value of this option overrides the value of the JP1_HOSTNAME environment variable. If you omit this option, the value of JP1_HOSTNAME is assumed as the logical host name.
When setting up a scheduler service for a physical host, you can specify the physical host name in either of the following ways:
-
Omit the -h option and do not set the JP1_HOSTNAME environment variable.
-
Specify JP1_DEFAULT as the value of the -h option or the value of the JP1_HOSTNAME environment variable.
You cannot set a physical host name by specifying a machine name in the -h option or in the JP1_HOSTNAME environment variable.
If you are setting up the scheduler service on a logical host, you must also specify the -D, -I, and -P options.
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.
For the characters you can specify in a scheduler service name, see the note about scheduler services under Table 2-2 in 2.2 Setting up the scheduler service environment in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 2.
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 the communication port number to be used for acquiring job status information by the service name. When the jajs_setup command has completed, define the service name specified in this option in the services file.
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
-
When the root directory (/) is specified in UNIX
-
When characters other than the drive letter (for example, C:) are specified in the first two bytes of the character string in Windows
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
-
When the root directory (/) is specified in UNIX
-
When characters other than the drive letter (for example, C:) are specified in the first two bytes of the character string in Windows
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
-
When the root directory (/) is specified in UNIX
-
When characters other than the drive letter (for example, C:) are specified in the first two bytes of the character string in Windows
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.
The command displays a message and terminates abnormally in the following cases:
-
When the specified value is outside the valid range
-
When the root directory (/) is specified in UNIX
-
When characters other than the drive letter (for example, C:) are specified in the first two bytes of the character string in Windows
You must specify this option with the -a options.
When the scheduler service reference restriction function is enabled (the HIDEOTHERSERVICE environment setting parameter is set to yes), specify a separate directory for each scheduler service as the backup information directory for that scheduler service. If the backup information directory is shared by multiple scheduler services, any user with access privileges to any of the scheduler services can access all of the backup information stored in the common backup information directory.
-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. For the name of the directory shared by logical hosts, specify the same shared directory name that was specified in the -d option of the jajs_setup_cluster command when the target logical hosts were created.
You can specify a character string of 1 to 165 bytes.
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 root directory (/) is specified in UNIX
-
When characters other than the drive letter (for example, C:) are specified in the first two bytes of the character string in Windows
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
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.
To set up a scheduler database in an embedded database that you have already configured, specify the setup identifier of the pre-configured database in this option. If you do not specify the setup identifier of the pre-configured embedded database, a new embedded database is configured with the setup identifier specified in the -I option.
If you did not specify the setup identifier of the pre-configured embedded database on a logical host, set up the embedded database on a secondary node.
If you did not specify the setup identifier of the pre-configured embedded database, the embedded database data area is created in the following applicable directory.
- In Windows:
-
- Physical host:
-
JP1/AJS3-installation-folder\embdb\setup-identifier\dbarea
- Logical host:
-
shared-folder\jp1ajs2\embdb\setup-identifier\dbarea
- In UNIX:
-
- Physical host:
-
/var/opt/jp1ajs2/embdb/setup-identifier/dbarea
- Logical host:
-
shared-directory/jp1ajs2/embdb/setup-identifier/dbarea
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
Specify the port number used for the embedded database.
To create a new scheduler database in an embedded database that you have already configured, specify the port number of the embedded database specified by the setup identifier in the -I option. If you are creating a new embedded database in which to set up the scheduler database, specify a port number that is not being used in the system.
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.
-M {s|m|l}
Specify the database model of the embedded database to be configured.
For details about the database model and disk requirements, see B.1 Estimating the amount of required database area in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 1.
If you configure the embedded database with l specified in this option, the auto-increment function of the embedded database is disabled. If you want to use this function, perform an advanced setup.
When an embedded database configured with the setup identifier specified in the -I option exists, only the re-use start point of the free area in the embedded database is set. In this case, if the -M option is omitted, the database model of the embedded database in the installation directory is assumed. If the embedded database in the installation directory was configured in JP1/AJS3 version 09-50 or earlier, s is assumed.
If the embedded database configured with the setup identifier specified in the -I option does not exist, a new embedded database is set up with the specified model. If you omit this option, the system assumes s.
You must specify this option with the -a option.
You cannot specify this option with the -S option.
-E {byte|sjis}
Specifies for the database of the specified scheduler service whether the same number of characters can be specified for items such as a unit name in both Shift-JIS and UTF-8 environments. If you omit this option, the system assumes byte.
This option can be specified in UNIX, and cannot be specified in Windows.
You must specify this option with the -a option.
You cannot specify this option with the -S option.
-
byte
The database is set up so that the number of characters specifiable in a UTF-8 environment becomes the number of characters specified after conversion in UTF-8. If this option is specified, the number of characters specifiable for items such as a unit name in a Shift-JIS environment and a UTF-8 environment will not be the same.
If you execute the command with this option specified, byte is specified for the DEFLENTYPE environment setting parameter.
-
sjis
The database is set up so that the number of characters specifiable in a UTF-8 environment is converted to the number of characters specifiable in a Shift-JIS environment. If this option is specified, the number of characters that can be used in the definition items for a unit in the UTF-8 environment is the same as that in the Shift-JIS environment.
This setting applies to the following items:
-
Unit name in the detailed unit definition
-
Comment in the detailed unit definition
-
Exclusive jobnet in the schedule settings
If you execute the command with this option specified, sjis is specified for the DEFLENTYPE environment setting parameter and UTF-8 is specified for the AJSCHARCODE environment setting parameter.
-
-S
Specify this option to set up an embedded database separately by performing an advanced setup instead of setting up the embedded database by using the regular method.
For details about setting up the embedded database by performing an advanced setup, see D. Advanced Setup for the Embedded Database (in a Cluster Configuration) in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 1.
You must specify this option with the -a option.
You cannot specify this option with the -I, -P, and -M options.
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, you must place all the embedded databases configured in the target host in running status. If you execute the command without checking the status, the command might terminate abnormally. To check the setup identifiers (_JFn) of the embedded databases configured in the target host, execute the ajsembdbidlist command.
The following describes how to check the status of an embedded database.
- In Windows:
-
- Check whether the service of the JP1/AJS3 Database _JFn (n: 0 to 9 or A to Z) has started. Start the service if inactive.
- Execute the ajsembdbstatus command with the -s ust -id _JFn (n: 0-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:
-
Execute the ajsembdbstatus command with the -s ust -id _JFn (n: 0-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:
-
15.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.
-
To execute this command, the JP1/AJS3 logical host must be reachable using the IP address resolved from the logical host name.
-
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"
-
-
To rename a scheduler service that has an operation profile, change the file name of the operation profile.
For example, suppose that the AJSROOT2 scheduler service has a unit-attribute profile and you want to change the service name to AJSROOT3. To do so, change the file name of the unit-attribute profile as follows:
Old name: ajsprof_AJSROOT2_unit.conf
New name: ajsprof_AJSROOT3_unit.conf
-
When deleting a scheduler service, delete its operation profile as needed.
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 |
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