Job Management Partner 1/Automatic Job Management System 3 Command Reference 1
Format
ajsdefine
[-F service-name]
[-S]
[{-x|-t}]
[{-i|-e|-f}]
[-d destination-unit-name]
[unit-definition-file-name...]
Description
Defines a unit based on the parameters coded in a unit definition file.
For details about a unit definition file, see 4.1 Creating a unit definition file in the manual Job Management Partner 1/Automatic Job Management System 3 Command Reference 2.
Execution privileges
You must have any of the following JP1 privileges:
- JP1_AJS_Admin privilege
- JP1_AJS_Manager privilege
- JP1_AJS_Editor privilege
Arguments
-F service-name
Specify the name of the target scheduler service.
You can specify a character string of 1 to 30 bytes.
-S
This option makes it possible to update the definitions of nested jobnets and jobs, even for suspended jobnets that have been registered for execution. Even for suspended jobnets, however, you cannot update definitions in the following situations:
- While the definition of the root jobnet is being updated
- While the definitions of job groups containing the definition of the root jobnet are being updated
- While jobnets are being executed
-x
Defines a unit based on the parameters coded in a unit definition file.
-t
Performs only a syntax check for the parameters coded in a unit definition file.
-i
Displays a message with a confirmation prompt if the definition destination contains a unit having the same name as the unit coded in the unit definition file. Enter y in response to this prompt to enforce backup (and update information). This option generates an error if the unit definition file contains the specification of units having the same name in the same layer.
-e
Generates an error without updating information, if the definition destination contains a unit having the same name as the unit coded in the unit definition file. This option generates an error if the unit definition file contains the specification of units having the same name in the same layer. The system does not update information.
-f
Enforces backup (and updates information) if the definition destination contains a unit having the same name as the unit coded in the unit definition file. This option generates an error if the unit definition file contains the specification of units having the same name in the same layer.
-d destination-unit-name
Specify the name of the job group or jobnet in which you want to define the unit.
You can specify a character string of 1 to 255 bytes. You cannot specify the logical host name or execution ID. You cannot specify a job group or jobnet for which the number of nested units exceeds 30, the maximum allowed.
If this option is omitted, the root job group (/) is assumed, in which units will be created.
unit-definition-file-name
Specify the name of the file in which you defined the unit definition parameters (attributes of the unit).
You can specify a character string of 1 to 255 bytes.
You can specify more than one unit definition file. You cannot use wildcard characters here.
If the coding of any unit definition file is invalid, the system stops processing that file but continues processing other files.
If you omit this option, the system inputs the unit definition parameters from the standard input.
Notes
- If an error occurs while the system is defining a unit, it deletes the unit being defined. This command terminates abnormally.
- If the jobnet specified for destination-unit-name is in either of the following states, this command terminates abnormally:
- The jobnet is registered for execution, and is not in the suspend status.
- The jobnet has been edited exclusively by JP1/AJS - View.
- You cannot define a job group in a jobnet.
- You cannot define a unit in a job, manager job group or manager jobnet.
- You cannot update information about a root jobnet registered for execution or information about any job group or planning group containing that root jobnet.
- For a jobnet registered for execution, you cannot define a unit in the jobnet or in its upper-level or lower-level unit.
- In the following units, however, specifying the -s option in this command while keeping the target jobnet suspended allows you to specify information without having to cancel the registration of the jobnet: units in the root jobnet, those in the job groups containing the root jobnet, and those in other than remote jobnets. (If the target unit is currently being executed, specifying the -s option will not allow you to update the information.)
- You cannot define a planning group in a jobnet.
- You cannot define any unit other than a jobnet or remote jobnet in a planning group.
- If you use the command to define a jobnet, the system does not check the consistency of the execution order of units.
A jobnet in which units will result in a loop or a judgment job without any associated dependent units results in an error and is placed in Invalid exe. seq. status.
- If you attempt to define a unit in a release target jobnet (root jobnet for which release entry is made), the definition of the unit is added to the jobnet definitions in Being applied status.
- You cannot define jobnet connectors or start conditions in release target jobnets (root jobnets for which release entry is made).
Return values
0 Normal end Multiple of 4 within the range from 4 to 124 Abnormal end
Additional information
If the window position is not specified for units to be defined, they are automatically located in an empty space on the Jobnet Editor window in JP1/AJS3 - View (somewhere from the top left to the bottom right).
Example
The following command defines a unit in job group /group1 based on the parameters coded in unit definition file /tmp/unit_def:
ajsdefine -d /group1 /tmp/unit_def
Copyright (C) 2009, 2010, Hitachi, Ltd.
Copyright (C) 2009, 2010, Hitachi Solutions, Ltd.