Hitachi

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


jajs_setup

Organization of this page

Format

jajs_setup
     {[-F scheduler-service-name] | [-G]}
     {-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]
      [-k {EmbedDB | SQLSVR}]
      [-of ODBC-file-data-source-name -od database-name]
      [[-I setup-identifier
       -P embedded-database-port-number]
       [-M {s|m|l}]
       [-E {byte | sjis}]
       [-B]] |
       [-S] |
       -r -A new-scheduler-service-name |
      -e}

Format 1 (for adding a scheduler service whose database type is embedded database)

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]
     [-k EmbedDB]
     [[I setup-identifier
       -P embedded-database-port-number]
      [-M {s|m|l}]
      [-E {byte | sjis}]
      [-B] |
      -S]

Format 2 (for adding a scheduler service whose database type is external database)

jajs_setup
     -a
     -k SQLSVR
     [-h JP1_DEFAULT]
     [-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
     -of ODBC-file-data-source-name
     -od database-name
     [-E {byte | sjis}]

Format 3 (for setting up information about an execution agent when the database type is external database)

jajs_setup
     -a
     -k SQLSVR
     [-h JP1_DEFAULT]
     -G
     -of ODBC-file-data-source-name
     -od database-name

Format 4 (for renaming a scheduler service)

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

Format 5 (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 or set up execution agent information.

When this command is used to add a new scheduler service whose database is embedded, 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, -G, -n, -p, -d, -t, -j, -b, -k, -of, -od, -I, -P, -M, -B, and -S options. If you add a scheduler service to a logical host, you must also specify the -D option.

If you specify this option to add a scheduler service, you cannot omit the, -n, -p, -d, -t, -j, and -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 23.4 Advanced setup of an embedded database in the JP1/Automatic Job Management System 3 Configuration Guide.

-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.

You cannot use this option to change only the case (uppercase/lowercase) of characters in a scheduler service name. To change only the case of a scheduler service name, first change the scheduler service name provisionally and then change the case.

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 JP1/Automatic Job Management System 3 Configuration Guide

  • In a cluster environment

    8.2.10(4) Renaming a scheduler service in the JP1/Automatic Job Management System 3 Configuration Guide

In UNIX:
  • In a non-cluster environment

    15.1.1(4) Renaming a scheduler service in the JP1/Automatic Job Management System 3 Configuration Guide

  • In a cluster environment

    17.2.10(4) Renaming a scheduler service in the JP1/Automatic Job Management System 3 Configuration Guide

-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.10(2) Deleting an added scheduler service in the JP1/Automatic Job Management System 3 Configuration Guide (for Windows) or see 17.2.10(2) Deleting an added scheduler service in the JP1/Automatic Job Management System 3 Configuration Guide (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 20-2 Environment setting parameters (scheduler service environment setup) in 20.4 Setting up the scheduler service environment in the JP1/Automatic Job Management System 3 Configuration Guide.

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

This option cannot be specified together with the -G option.

-G

Specify this option to set up information about an execution agent if you are using an external database to operate JP1/AJS3.

This option can be specified in Windows or Linux, but it cannot be specified in AIX, HP-UX, or Solaris.

You must specify this option with the -a and -k SQLSVR options.

You cannot specify this option with the -F, -n, -p, -d, -t, -j, -b, -D, -I, -P, -M, -E, -B, and -S options.

You cannot specify this option to set up a logical host.

-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.

This option cannot be specified together with the -G option.

-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.

This option cannot be specified together with the -G option.

-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.

This option cannot be specified together with the -G option.

-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.

This option cannot be specified together with the -G option.

-j job-information-directory-name

To use an embedded database, specify the full path name of the directory that will store the standard error output file during job execution if the standard error output file is not specified during job definition.

To use an external database, specify the full path name of the directory in which job information work 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 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.

This option cannot be specified together with the -G option.

-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.

This option cannot be specified together with the -G option.

-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.

You cannot specify this option with the -G, -k SQLSVR, -of, and -od options.

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

-k {EmbedDB | SQLSVR}

Specify the database type to be used. If you omit this option, the system assumes EmbedDB.

This option can be specified in Windows or Linux, but it cannot be specified in AIX, HP-UX, or Solaris.

You must specify this option with the -a options.

  • EmbedDB

    An embedded database is used.

    You cannot specify this value at the same time as the -G, -of and -od options.

  • SQLSVR

    An external database is used.

    You cannot specify this value at the same time as the -D, -I, -P, -M, -B, and -S options.

    You cannot specify this value to set up a logical host.

The same database type must be used on the same host. The command terminates abnormally if any of the following database types differ from their specified value:

  • Scheduler database

  • Agent management database

-of ODBC-file-data-source-name

To use an external database, specify the full path name of the ODBC file data source (the file name of a File DSN).

You cannot specify a network drive.

The number of characters that can be specified is as follows:

  • In Windows:

    A character string of 1 to 255 bytes

  • In Linux:

    A character string of 1 to 128 bytes

You can specify the following characters:

  • Alphanumeric characters

  • Symbols

    For Windows: (\), (:), (.)

    For UNIX: (/), (.)

You cannot specify a value that contains a space.

This option can be specified in Windows or Linux, but it cannot be specified in AIX, HP-UX, or Solaris.

You must specify this option with the -a and -k SQLSVR options.

You cannot specify this option with the -D, -I, -P, -M, -B, and -S options.

You cannot specify this option to set up a logical host.

You must specify this option if you are using an external database.

The command terminates abnormally if the ODBC file data source specified in this option does not exist.

-od database-name

To use an external database, specify its name. You must specify this option if you are using an external database.

You can specify a character string of 1 to 127 bytes. However, you can specify single-byte alphanumeric characters only.

This option can be specified in Windows or Linux, but it cannot be specified in AIX, HP-UX, or Solaris.

You must specify this option with the -a and -k SQLSVR options.

You cannot specify this option with the -D, -I, -P, -M, -B, and -S options.

You cannot specify this option to set up a logical host.

You must specify this option when using an external database.

The command terminates abnormally if the external database specified in this option does not exist.

-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.

You cannot specify this option with the -G, -k SQLSVR, -of, and -od 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.

You cannot specify this option with the -G, -k SQLSVR, -of, and -od 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 23.2 Estimating the database area in the JP1/Automatic Job Management System 3 Configuration Guide.

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.

You cannot specify this option with the -G, -k SQLSVR, -of, -od, and -S options.

-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 -G and -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.

-B

Specify this option to enable the backup enhancement function when an embedded database is used. If you omit this option, the backup enhancement function is not enabled.

You must specify this option with the -a option.

You cannot specify this option with the -G, -k SQLSVR, -of, and -od options.

-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 23.5 Advanced setup for the embedded database (in a cluster configuration) in the JP1/Automatic Job Management System 3 Configuration Guide.

You must specify this option with the -a option.

You cannot specify this option with the -G, -k SQLSVR, -of, -od, -E, -I, -P, and -M options.

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

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

Example 5

The command in this example sets up execution agent information by using an external database.

jajs_setup -a -k SQLSVR -G -of C:\odbc\ajsdatasource.dsn -od AJSDB

Example 6

The command in this example adds a scheduler service with the following conditions by using an external database.

jajs_setup -a -k SQLSVR -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"
   -of "/odbc/ajsdatasource.dsn" -od AJSROOT2DB