Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


2.5.8 JP1/AJS root jobnet deletion

Function

This service template deletes root jobnets defined in JP1/AJS3 - Manager (hereafter referred to as "JP1/AJS3") based on a list of processing-target root jobnets (hereafter referred to as the "root jobnet definition file") created in CSV (Comma Separated Values) or Excel format.

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:

- Job server

A server running JP1/AJS, where the root jobnets to be deleted are 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) For each row corresponding to a key value, retrieve the root jobnet name.

(2) Using the information retrieved in step (1), execute the command ajsleave on the job server to cancel the registration of root jobnets that are scheduled to be executed. Even if cancellation fails, processing continues without resulting in an error.

(3) Using the information retrieved in step (1), execute the command ajsdelete on the job server to delete root jobnet definitions for root jobnets that are not registered for execution. If deletion fails, the task terminates abnormally.

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

If the JP1/AO server and the execution target server is Windows, the execution of this services template requires the built-in Administrator. If the built-in Administrator does not exist or is invalid on each server, execute the "JP1/AJS root jobnet deletion(SYSTEM)" service template that executes with the system account.

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 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 in the service-template execution system:

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

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

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

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

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

(5-a) Number of columns

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

(5-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 (6).

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

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

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

Example:

Key,Parent Unit,Root Jobnet

1,/parent1,jobnet1

2,/parent2,jobnet2

3,/parent3,jobnet3

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

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

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

(7-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: ! [ ] ` , .

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

(8) 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 on 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 items:

- For the property jp1ajs.logicalHostNameRemote: 64 characters

- For the jobnet definition file entry "parent unit name": 512 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

- 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

(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

- Root jobnet definition file entries

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

Execution privilege

Built-in Administrator

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 job server:

The JP1_AJS_Manager or JP1_AJS_Admin permission is required.

Note: If you do not need to cancel the registration of root jobnets for execution, the user only need to have the JP1_AJS_Editor permission.

Version

03.01.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 server information

Information about the job 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 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 server information

OS.osKind

OS type

Specify the OS type (Windows or UNIX).

Input

Disabled

R

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

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

getRootJobnetKeyList

Obtain column data from a CSV/Excel file

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

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

2

forEachRootJobnet

Repeated Execution Plug-in

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

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