Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


2.5.6 JP1/AJS root jobnet migration(SYSTEM)

Function

This service template migrates the root jobnets of JP1/AJS3 - Manager (hereafter referred to as "JP1/AJS3") from the development server to the job server, based on a list of processing-target root jobnets (hereafter referred to as the "root jobnet definition file"). The root jobnet definition file is either a CSV (Comma Separated Values) file or an Excel file.

If the JP1/AO server is in a Windows environment, use a CSV or Excel file. If the JP1/AO server is in a UNIX environment, use a CSV file.

To use this service template, the following servers are required:

- Development server

A server running JP1/AJS, where the target root jobnets are registered

- Job server

A server running JP1/AJS, where the target root jobnets are to be registered

Key values are retrieved from the root jobnet definition file specified by the property jp1ajs.jobnetListFilePath, and then the following processing is executed for all key values:

(1) From each row corresponding to a key value, retrieve the root jobnet name, the host name of the job execution agent, and the user name of the job execution user.

(2) Using the information retrieved in step (1), execute the command ajsprint on the development server, and then output the root jobnet information as a unit definition file.

(3) Transfer the unit definition file output in step (2) to the job server via the JP1/AO server.

(4) Execute the command ajsdefine on the job server to register the root jobnets.

(5) If the host name of the job execution agent is specified, execute the command ajschange on the job server to change the host name for all jobs belonging to the root jobnets.

(6) If the user name of the job execution user is specified, execute the command ajschange on the job server to change the user name for all jobs belonging to the root jobnets.

The root jobnet definition file can contain a maximum of 99 entries (rows) of root jobnet information.

During processing to change root jobnet information, a plug-in is executed repeatedly to change each entry sequentially.

If processing fails during repetition, the task will immediately end abnormally.

If reading a root jobnet definition file fails, wait for the seconds specified in the OS.fileOpenRetryInterval property, and then repeat the number of times specified in the OS.fileOpenRetryCount property to retry for reading a file. If necessary, modify the property values to adjust your system environment.

Prerequisites

For the most recent information about the prerequisite products for the system, prerequisite products for the system executing the service templates, and the supported OSs for the prerequisite products for the system executing the service templates, see the Release Notes.

Prerequisite products for the system:

JP1/Automatic Operation 12-00 or later

Prerequisite products for the system executing the service templates:

(1) The following Microsoft program must be installed on the JP1/AO server:

2007 Office System Driver, or

Microsoft Access Database Engine 2010(32bit), or

Microsoft Access Database Engine 2016(32bit)

(2) The following product must be running on the development server and job server:

Job Management Partner 1/Automatic Job Management System 3 - Manager 09-00 or later, or

JP1/Automatic Job Management System 3 - Manager 11-00 or later

Supported OSs for the prerequisite products for the system executing the service templates:

(1) Windows Server 2008 R2 Standard/Enterprise/Datacenter

(2) Windows Server 2012 Standard/Datacenter or Windows Server 2012 R2 Standard/Datacenter

(3) Windows Server 2016 Standard/Datacenter

(4) Windows Server 2019 Standard/Datacenter

(5) Red Hat Enterprise Linux Server 6 (32-bit x86) or Red Hat Enterprise Linux Server 6 (64-bit x86_64)

(6) Red Hat Enterprise Linux Server 7 (64-bit x86_64)

(7) Red Hat Enterprise Linux Server 8 (64-bit x86_64)

(8) AIX V6

(9) AIX V7

Conditions for using the prerequisite products on the system executing the service template:

(1) A JP1/AJS scheduler service must be running.

(2) The JP1 user specified by the property jp1ajs.jp1UserName must be registered on both the development server and job server.

(3) The migration-target root jobs must not be registered on the job server.

If migration-target root jobs are registered, use the JP1/AJS Root Jobnet Deletion service to delete the jobs in a batch.

(4) This service template supports only the migration of root jobnets. It does not support the migration of job groups.

(5) The development server and job server must run the same type of OS (either Windows or UNIX).

(6) The root jobnet definition file containing the following information must be stored on the JP1/AO server:

(6-a) Number of columns

There must be no more than 255 columns after the column starting from which data is to be retrieved.

(6-b) Column names

For CSV files:

- If column names are necessary, specify them in the first row. If column names are unnecessary, do not specify them.

- Regardless of whether column names are specified, data retrieval must start from the second row or a following row.

For Excel files:

- Column names must be specified. In the file, the first row containing data is assumed to be the row of column names.

- Data retrieval starts from the row below the row of column names.

When specifying column names, follow the rules described in (8).

(6-c) Key information

Each row in the root jobnet definition file must have a unique key value, specified in the key value column. You can use any value for the key value. We recommend that you use short values, such as integers starting from 1. Key values must not contain a double quotation mark (") or single quotation mark ('). The sum of the total number of bytes for all key values and the number of data rows must not exceed 1,017 bytes. If you omit a key value, the corresponding row will be excluded from the processing target.

(6-d) Parent unit name

Specify the name of the parent unit for each root jobnet. Make sure that the same parent unit name is specified on both the development server and the job server. To specify a root job group, enter a null string.

(6-e) Root jobnet name

Specify root jobnet names. You cannot specify the names of jobs or job groups. You cannot specify the names of jobnets that are not root jobnets. Make sure that the same root jobnet names are specified on both the development server and the job server. You cannot omit a root jobnet name.

(6-f) Job execution agent host name

Specify the host names of the job execution agents used for the root jobnets registered on the job server. The specified host name is applied to all jobs under the applicable root jobnet. If you omit this specification, the job server inherits the job execution host definition for the corresponding jobnet on the development server. If you do not want to use the definitions on the development server, make sure to specify the job execution agent host names.

(6-g) Job execution user name

Specify the user names of job execution users used for the root jobnets registered on the job server. The specified user name is applied to all jobs subordinate to the applicable root jobnet. If you omit this specification, the job server inherits the job execution user definition for the corresponding jobnet on the development server. If you do not want to use the definitions on the development server, make sure to specify the job execution user names.

Example:

Key,Parent Unit,Root Jobnet,Job Execution Host,Job Execution User

1,/parent1,jobnet1,host1,jp1user1

2,/parent2,jobnet2,host2,jp1user2

3,/parent3,jobnet3,,jp1user3

4,/parent4,jobnet4,host4,

5,/parent5,jobnet5,,

(7) In order to execute this service, you must set the JP1/AO server (loopback address resolved by "localhost"), development server, and job server as agentless connection destinations.

(8) When specifying column names in the root jobnet definition file, follow the rules below.

(8-a) Use string-type data instead of numeric-type data.

(8-b) The specifiable characters are as follows:

- The first character of the key value column name must not be a number (one-byte or two-byte) or any of the following symbols: ! " # $ % & ' ( ) - = ^ ~ \ | ` ; + * [ ] { } , . < > ? _ /

- The key value column name cannot contain any of the following symbols: " # % & ' ( ) - = ^ ~ \ | @ ; : + * [ ] { } , . < > ? /

- The names of columns other than the key value column must not contain any of the following symbols: ! [ ] ` , .

(8-c) Each column name can have a maximum of 64 characters (one-byte or two-byte).

(9) Check the fields to be read from the root jobnet definition file to make sure none of the following exist:

- A field containing any of the following symbols: , < > | ; &

- A field containing a double quotation mark (") that is not used to enclose the field value.

- A field ending with a backslash (\).

- A field containing any control characters (0x00 to 0x1f).

If there is a field that meets any of the conditions above, the task terminates abnormally.

If all fields in a row are blank, the task ignores the row and reads the next row.

Cautions

[Notes on root jobnet definition files]

- If the JP1/AO server is running in a Windows environment

(1) For Excel files, make sure there are no merged cells or cells containing errors in expression. If such a cell exists, a null value is read for that cell. In addition, make sure no write-protection password is set. If a write-protection password is set for the root jobnet definition file to be read, the task terminates abnormally.

(2) Make sure that string-type data and numeric-type data do not coexist in the same column. If different types of data coexist, values might not be obtained correctly, depending on the specifications of the ODBC driver.

(2-a) Numeric-type data includes the following types of base-10 numbers:

Negative integers (Example: -12345)

Fixed-point numbers (Example: 3.1415)

Floating-point numbers (Example: 6.543E+10)

(2-b) String-type data is any data that is not numeric-type data.

(3) To obtain a column that contains different types of data from the file to be read, first perform one of the following steps:

- If the root jobnet definition file is an Excel file, prefix each numeric-type value with a single quotation mark (').

- If the root jobnet definition file is a CSV file, enclose each numeric-type value in double quotation marks (").

(4) When counting rows in the file to be read, empty rows after the first non-empty row and before the last non-empty row are counted as ordinary rows. Even if the number of rows containing data is 99 or less, if the total number of rows including empty rows is 100 or more, the task terminates abnormally.

- If the JP1/AO server is running in a UNIX environment

(1) When counting rows in the file to be read, empty rows after the first non-empty row and before the last non-empty row are counted as ordinary rows. Even if the number of rows containing data is 99 or less, if the total number of rows including empty rows is 100 or more, the task terminates abnormally.

(2) Commas (,) cannot be used in data. If you attempt to use commas in data, columns cannot be separated correctly, making it impossible to acquire data.

(3) Any number of single-byte spaces or tab characters at the beginning or end of a row in a root jobnet definition information file are ignored.

[Other notes]

(1) Note the following restrictions on the maximum lengths of certain properties:

- jp1ajs.logicalHostNameRemote: 64 characters

- jp1ajs.logicalHostNameDevelop: 64 characters

- jp1ajs.workDirectoryRemote: 128 characters

- jp1ajs.workDirectoryDevelop: 128 characters

Note the following restrictions on the maximum lengths of certain jobnet definition file entries:

- Parent unit name: 512 characters

- Job execution host name: 64 characters

If you specify a value longer than the maximum length, a command executed by the task might be truncated. A truncated command might not be executed normally. If a maximum length is exceeded, the message KNAE08015-W is output to the task log.

(2) If the OS of both the development server and the job server is Windows, to specify a percent sign (%) for any of the items below, you must add an escape character (%). In other words, specify %%.

- The property jp1ajs.jp1UserName

- The property jp1ajs.serviceNameRemote

- The property jp1ajs.serviceNameDevelop

- Root jobnet definition file entries (Note that you cannot use percent signs in root jobnet names.)

(3) If the OS of both the development server and the job server is Windows, you cannot use a double quotation mark (") for either of the following properties:

- jp1ajs.serviceNameRemote

- jp1ajs.serviceNameDevelop

(4) If the OS of both the development server and the job server is UNIX, you cannot use a single quotation mark (') for any of the following items:

- The property jp1ajs.jp1UserName

- The property jp1ajs.serviceNameRemote

- The property jp1ajs.serviceNameDevelop

- The property jp1ajs.workDirectoryRemote

- The property jp1ajs.workDirectoryDevelop

- Root jobnet definition file entries

(5) For more information, see the notes on the commands ajsprint, ajschange, and ajsdefine in the manual "Job Management Partner 1/Automatic Job Management System 3 Command Reference 1".

Execution privilege

Users who belong to the Administrator group

If the user used to log in to the execution target server is the user specified by the property jp1ajs.jp1UserName and if "yes" is specified for the environment settings parameter ADMACLIMIT of the JP1/AJS3 common information, the user must have the following permissions:

(Applicable for both Windows and UNIX)

For the development server:

The JP1_AJS_Guest, JP1_AJS_Operator, JP1_AJS_Editor, JP1_AJS_Manager, or JP1_AJS_Admin permission is required.

For the job server:

The JP1_AJS_Editor, JP1_AJS_Manager, or JP1_AJS_Admin permission is required.

Version

03.10.02

Tags

Configure JP1,AJS

Property list

The following shows the list of the property groups set in the property:

Property group

Description

Initial display

Root jobnet information

Information about a root jobnet.

Y

Job/development server information

Information about the job server and development server.

Y

JP1/AO server information

Information about the JP1/AO server.

Y

The following shows the list of the properties to be displayed in the "Service Definition" window:

(Legend)

R: The property must be specified.

O: The property can be omitted. However, the property might be mandatory depending on what is specified for other properties. See the Description of each property.

Property key

Property name

Description

I/O type

Shared

Required

Property group

jp1ajs.hostNameRemote

Host name (job server)

Specify the host name or IP address of the job server. Make sure that you do not specify an IPv6 address. In a cluster configuration, specify the physical host or logical host of the active server.

Input

Disabled

R

Job/development server information

jp1ajs.hostNameDevelop

Host name (development server)

Specify the host name or IP address of the development server. Make sure that you do not specify an IPv6 address. In a cluster configuration, specify the physical host or logical host of the active server.

Input

Disabled

R

Job/development server information

jp1ajs.logicalHostNameRemote

Logical host name (job server)

If JP1/AJS on the job server is in a cluster configuration, specify the logical host name of JP1/AJS.

Input

Disabled

O

Job/development server information

jp1ajs.logicalHostNameDevelop

Logical host name (development server)

If JP1/AJS on the development server is in a cluster configuration, specify the logical host name of JP1/AJS.

Input

Disabled

O

Job/development server information

OS.osKind

OS type

Specify the OS type (Windows or UNIX).

Input

Disabled

R

Job/development server information

OS.fileOpenRetryCount

Retry count for reading a file: Windows specific

Specifies the number of times to retry when reading a root jobnet definition file fails (only applicable to Windows). This value multiplied by the retry interval gives the maximum waiting time. If "0" is specified, a retry is not performed.

Input

Disabled

R

Root jobnet information

OS.fileOpenRetryInterval

Retry interval for reading a file: Windows specific

Specifies the retry interval in seconds for when reading a root jobnet definition file fails (only applicable to Windows).

Input

Disabled

R

Root jobnet information

The following shows the list of the properties to be displayed on the "Service Definition" window and the "Submit Service" window:

Property key

Property name

Description

I/O type

Shared

Required

Property group

jp1ajs.jobnetListFilePath

Path of the root jobnet definition file

Specify a full path for the root jobnet definition file stored on the JP1/AO server. The file extension of the file must be csv, xls, xlsx, or xlsm.

Input

Disabled

R

Root jobnet information

jp1ajs.jobnetInfoSheetName

Root jobnet definition file's sheet name

Specify the name of the sheet that contains root jobnet information. Make sure that you specify this item if the root jobnet definition file is an Excel file. The sheet name specified for a CSV file is ignored.

Input

Disabled

R

Root jobnet information

jp1ajs.serviceNameRemote

JP1/AJS scheduler service name (job server)

Specify the name of a scheduler service on the job server.

Input

Disabled

R

Job/development server information

jp1ajs.serviceNameDevelop

JP1/AJS scheduler service name (development server)

Specify the name of a scheduler service on the development server.

Input

Disabled

R

Job/development server information

jp1ajs.workDirectoryLocal

Work folder (local)

Specify a full path for the work folder on the JP1/AO server.

Input

Disabled

R

JP1/AO server information

jp1ajs.workDirectoryRemote

Work folder (job server)

Specify a full path for the work folder on the job server. If you execute this service in a UNIX environment, do not use multi-byte characters when specifying values for properties.

Input

Disabled

R

Job/development server information

jp1ajs.workDirectoryDevelop

Work folder (development server)

Specify a full path for the work folder on the development server. If you execute this service in a UNIX environment, do not use multi-byte characters when specifying values for properties.

Input

Disabled

R

Job/development server information

jp1ajs.jp1UserName

JP1 user name

Specify the name of the JP1 user who executes JP1/AJS commands. If this JP1 user name is the same as the name of the OS user who logs in to the server, you do not need to specify this item.

Input

Disabled

O

Job/development server information

The following shows the list of the properties to be displayed in the "Task Details" window only:

Property key

Property name

Description

I/O type

Shared

common.taskResult

Results of repeating tasks

This property contains the results of each task (as "true" or "false"), in a comma-delimited format.

Output

Disabled

The following shows the restrictions on inputs to the properties displayed in the "Service Definition" window:

Property key

Characters that can be input

jp1ajs.hostNameRemote

A string that has 255 or fewer single-byte alphanumeric characters, including periods (.) and hyphens (-)

jp1ajs.hostNameDevelop

A string that has 255 or fewer single-byte alphanumeric characters, including periods (.) and hyphens (-)

jp1ajs.logicalHostNameRemote

A string that has 255 or fewer single-byte alphanumeric characters, including periods (.) and hyphens (-)

jp1ajs.logicalHostNameDevelop

A string that has 255 or fewer single-byte alphanumeric characters, including periods (.) and hyphens (-)

OS.osKind

Select one of the following values:

Windows,UNIX

OS.fileOpenRetryCount

Integer value in the range from 0 to 32767.

OS.fileOpenRetryInterval

Integer value in the range from 1 to 60.

The following shows the restrictions on inputs to the property displayed on the "Service Definition" window and the "Submit Service" window:

Property key

Characters that can be input

jp1ajs.jobnetListFilePath

A string that has 8 to 255 characters, does not end with a backslash (\) or forward slash (/), and does not include the following symbols: < > | ; & * ? " % [ ] !

jp1ajs.jobnetInfoSheetName

A string that has 1 to 31 characters except for: 1) The following single-byte symbols: < > | ; : & * ? " % / \ ! ` { [ ] 2) Multi-byte characters corresponding to the following symbols: : \ ? [ ] / *

jp1ajs.serviceNameRemote

A string that has 255 or fewer characters, does not end with a backslash (\), and does not include the following symbols: < > | ; & `

jp1ajs.serviceNameDevelop

A string that has 255 or fewer characters, does not end with a backslash (\), and does not include the following symbols: < > | ; & `

jp1ajs.workDirectoryLocal

A string that has 200 or fewer characters, does not end with a backslash (\) or forward slash (/), and does not include the following symbols: < > | ; & * ? " % `

jp1ajs.workDirectoryRemote

A string that has 200 or fewer characters, does not end with a backslash (\) or forward slash (/), and does not include the following symbols: < > | ; & * ? " % `

jp1ajs.workDirectoryDevelop

A string that has 200 or fewer characters, does not end with a backslash (\) or forward slash (/), and does not include the following symbols: < > | ; & * ? " % `

jp1ajs.jp1UserName

A string that has 31 or fewer single-byte alphanumeric characters, including the following symbols: ! # $ % ' - @ _ ~

Flow specification details

The following table shows the detailed specification of the flow:

Hierarchy

Display name

Plug-in

Plug-in name

Description

Error recovery method

1

osGetOsInfo

Output OS type

Outputs the OS of the JP1/AO server.

Eliminate the cause of the error, and then re-execute the service.

2

getRootJobnetKeyList_System

Obtain column data from a CSV/Excel file(SYSTEM)

Obtains a list of key values of root jobnets from the root jobnet definition file.

After removing the cause of the error, run the service again.

3

forEachRootJobnet

Repeated Execution Plug-in

Migrates a repeated root jobnet based on the key information that was read.

After removing the cause of the error, run the service again.