4.6.17 Check JP1/AJS unit existence
Function
This plug-in checks if the unit exists in the instance of JP1/AJS3 - Manager (referred to as JP1/AJS hereafter) on the specified server.
The following servers are required for this plug-in:
- Job server (execution target server)
This is the server on which the JP1/AJS jobnet is executed. JP1/AJS, which is described in prerequisites, must be set up.
This plug-in returns a return value of 0 if the unit specified in the unit name (unitName property) exists.
If the unit does not exist or the existence check fails, this plug-in returns a value other than 0.
The scripts in this plug-in perform the following processes:
- If a value is specified for the logical host name of the job server (JP1.logicalHostName property), sets the JP1_HOSTNAME environment variable to the value of the logical host name.
- If a value is specified for the JP1 user name (JP1AJS.jp1UserName property), sets the JP1_USERNAME environment variable to the value of the JP1 user name.
- Executes the following command:
ajsname [-F "the-value-of-the-JP1/AJS-service-name-(JP1AJS.serviceName-property)"]
"the-value-of-the-unit-name-(JP1AJS.unitName-property)"#
#: Specify the name in the following format: [[scheduler-service-name]:]unit-name.
For details about the ajsname command, see the manual Job Management Partner 1/Automatic Job Management System 3 Command Reference 1.
Use situation
For example, it is used to check the existence of the JP1/AJS unit before operating the unit in other plug-ins.
Prerequisites
For the most recent information about the prerequisite products for the execution-target server, and the supported OSs for the prerequisite products for the execution-target server, see the Release Notes.
In addition, the following OS and products use abbreviations. For the abbreviations of OS and products, see the "Preface".
Prerequisite products for the execution-target server:
(1) JP1/AJS3 - Manager
Supported OSs for the prerequisite products for the execution-target server:
(1) Windows Server
(2) Red Hat Enterprise Linux Server
Conditions for using the execution-target server:
(1) For the JP1 user name (JP1AJS.jp1UserName property), specify the JP1 user name to check the existence of the unit on the execution target server. If you check the existence of the unit by using the JP1 user account that has the same name as the user of the OS this product connects to, you do not need to specify a value for this property.
(2) If you check the existence of the unit that is defined on the logical host in a cluster, the following settings must be specified:
- Specify a physical host name or a logical host name of the execution target server as the host name (plugin.destinationHost property) of the execution target server.
- Specify the name of the logical host, where the scheduler service is running, as the logical host name (JP1.logicalHostName property) of the execution target server.
- Specify the name of the scheduler service, which is running on the logical host, as the JP1/AJS service name (JP1AJS.serviceName property).
(3) If the OS running on the job server is UNIX, the character encoding setting of the environment setting parameter in the JP1/AJS instance on the job server must correspond to the default locale setting of the connected user account that connects to the job server.
Cautions
(1) Do not use double quotation marks (") or single quotation marks (') for the property of the plug-in.
(2) Even if the unit name (JP1AJS.unitName property) contains symbol characters (&, *, <, >, ?, [, \, ], ^, ', {, |, }, ~) that are escaped by using a backslash (\), you do not need to use double quotation marks (") at the beginning and the end of the strings in the property.
(3) For the unit name (JP1AJS.unitName property), explicitly specify the name of the unit whose existence is to be checked. Do not use the wildcard characters (*, ?, [, ]) in the unit name.
(4) For other cautions, see the cautions about the ajsname command described in the manual Job Management Partner 1/Automatic Job Management System 3 Command Reference 1.
Execution privilege
(1) The JP1 user account that is mapped to the OS user account connecting to the job server must have the read permission for the unit to be checked.
(2) If the JP1 user account that is mapped to the OS user account connecting to the job server does not exist, specify a JP1 user account that has read permission for the unit to be checked as the JP1 user name (JP1AJS.jp1UserName property).
Version
02.00.00
Plug-in tags
Gather JP1 information, AJS,Windows,Linux
Plug-in name displayed in the task log
jp1ajsExists
Return code
0: Normal
21: Error (Environmental error) No command was found. (An error was detected in the component script.)
27: Error (Check the error details by using the task log.) Unidentified error
41: Error (An error has been detected in the component.) Property not entered (An error has been detected in the component script.)
Property list
The following table lists the properties:
Property key |
Property name |
Description |
Default value |
I/O type |
Required |
---|---|---|---|---|---|
plugin.destinationHost |
Host name of the execution target server |
Specify the host name or IP address of the server on which this plugin will be executed. IPv6 addresses are not supported. |
-- |
Input |
R |
JP1.logicalHostName |
Logical host name for the execution target server |
Specify the JP1 logical host name of the execution target server. |
-- |
Input |
O |
JP1AJS.jp1UserName |
JP1 user name |
Specify a JP1 user name. You do not need to specify this property if you execute a command with a JP1 user name that is the same as the OS user name used for connecting to the execution target server. |
-- |
Input |
O |
JP1AJS.serviceName |
JP1/AJS service name |
Specify the service name of the scheduler. |
-- |
Input |
O |
JP1AJS.unitName |
Unit name |
Specify the name of the unit to confirm its existence. |
-- |
Input |
R |
common.returnValue |
Return value for the plugin |
The return value of this plugin stored. |
-- |
Output |
O |