ajscopy
- Organization of this page
Format
ajscopy [-F service-name] [-m permission-mode] [-c|-v] [-S] [-R] [-L|-E] [-T] [-G|-N|-J] -o output-destination-unit-name input-source-unit-name...
Description
Copies, moves or renames units.
When you copy a unit defined under a unit with the upper-level unit-attribute inheritance function set, a function will set the owner and JP1 resource group of the copy. For details on this function, see 6.4.1(4)(a) Overview of the upper-level unit-attribute inheritance function in the JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide.
When you move or rename a unit, it retains the owner and JP1 resource group of the source unit.
Execution privileges
You must have any of the following JP1 privileges:
-
JP1_AJS_Admin privilege
-
JP1_AJS_Manager privilege
-
JP1_AJS_Editor privilege
-
JP1_AJS_Operator privilege (allows you to execute this command only for the copy target unit and its subunits)
-
JP1_AJS_Guest privilege (allows you to execute this command only for the copy target unit and its subunits)
Arguments
-F service-name
Specify the name of the target scheduler service.
You can specify a character string of 1 to 30 bytes.
-m permission-mode
Specify the permission mode if you change the settings for the JP1 user for job execution before copying, moving, or renaming a jobnet.
You can specify a four-digit octal value.
The following is the meaning of each digit, starting from the left:
- 1st digit
-
Specify the handling of the user for job execution
0 to 3: Assumes the JP1 user who has registered the jobnet to be the user for job execution.
4 to 7: Assumes the JP1 user who owns the job to be the user for job execution.
- 2nd to 4th digits
-
Specifies any value between 0 and 7.
If you omit this option, the system assumes the same value as that for the source unit. This option is valid only if you define a job with the -o option.
-c
Copies the unit.
-v
Moves or renames the unit.
You cannot specify this option with the -E option.
-S
This option makes it possible to copy units under the particular jobnet, even for suspended jobnets that have been registered for execution. It is also possible to change the names of units that are added during the suspend operation. Even for suspended jobnets, however, you cannot copy or rename units in the following situation:
-
While jobnets are being executed
-R
Assumes all job groups, jobnets, and jobs contained in the specified unit as the input source unit.
If you specify this option with the -G, -N, -J, -L, -E, and/or -T options, the system assumes the input source unit according to the specification of each option.
-L
Assumes the job groups, jobnets not registered for execution, and jobs as the input source unit.
You cannot specify this option with the -G option.
-E
Assumes the jobnets registered for execution and jobs as the input source unit.
You cannot specify this option with the -v or -G option.
-T
Assumes the root jobnet as the input source unit.
You cannot specify this option with the -G or -J option.
-G
Assumes job groups as the input source unit.
You cannot specify this option with the -L, -E, -T, -N, or -J option.
-N
Assumes jobnets as the input source unit.
You cannot specify this option with the -G or -J option.
If you specify this option with the -T option, this option is disabled.
-J
Assumes jobs as the input source unit.
You cannot specify this option with the -G, -N, or -T option.
-o output-destination-unit-name
Specify the name of the unit to which you want to copy, move, or rename the unit.
You can specify a character string of 1 to 930 bytes.
- When copying or moving:
-
If you specify an existing job group name or jobnet name, the system copies or moves the unit into that unit.
- When renaming:
-
You cannot specify an existing job name, manager job group name, manager jobnet name.
Note that you cannot specify a logical host name, scheduler service name, or execution ID as output-destination-unit-name.
input-source-unit-name
Specify the name of the unit from which you want to copy, move, or rename the unit.
You cannot specify the start condition unit as input-source-unit-name.
You can specify a character string of 1 to 930 bytes.
You cannot specify a logical host name or execution ID as the input source unit.
Notes
-
Either of the following users can copy a unit:
-
A user granted the reference privilege for the unit copy source (and all subordinate data) and the update privilege for the copy destination
-
A JP1 user mapped to the OS user who has Administrators or superuser privileges
Note, however, that if yes is set after changing the ADMACLIMIT environment setting parameter from its default, even a JP1 user who was mapped to an OS user with Administrators or superuser privileges must have the reference privilege and the update privilege.
-
-
Any of the following users can move or rename a unit:
-
A user granted the update privilege for the source and destination units
-
A user granted the update privilege for the unit to be renamed
-
A JP1 user mapped to the OS user who has Administrators or superuser privileges
Note, however, that if yes is set after changing the ADMACLIMIT environment setting parameter from its default, even a JP1 user who was mapped to an OS user with Administrators or superuser privileges must have the update privilege.
-
- Common notes on copying, moving, and renaming:
-
-
If the unit (other than job groups) specified as the name of the output destination unit or name of the input source unit is currently open, this command terminates abnormally.
-
You cannot move or rename a unit containing a registered jobnet (other than remote jobnets) or a unit contained in such a registered jobnet. You cannot copy or move a unit into a registered jobnet. For units other than remote jobnets, however, specifying the -s option in this command while keeping the target jobnet suspended allows you to copy a unit to the target jobnet or rename an additional unit without having to cancel the registration of the jobnet.
-
You cannot assign the same name to both the input source unit and the output destination unit.
-
You must assign a new unit name to the output destination unit. (If you use any existing unit name, the target unit will move into the existing output destination unit.) With more than one input source unit specified, however, you cannot give a new unit name to the output destination name.
-
This command terminates abnormally if a unit specified in the name of the output destination unit or a unit specified in the name of the input source unit is undergoing a suspended-stage change.
-
- Copying and moving
-
-
You cannot copy or move a job group into a jobnet.
-
If an error occurs while the system is copying a unit, it deletes the unit that has been partly copied. This command terminates abnormally.
-
You cannot copy or move a planning group into a jobnet.
-
You cannot copy or move any unit other than a jobnet or remote jobnet into a planning group.
-
You cannot move or rename a planning group containing a registered root jobnet.
-
If you copy or move as a root jobnet a root jobnet that is a jobnet to which a jobnet connector is connected, execution order control information such as the jobnet connector name is also copied or moved. On the other hand, if you copy or move the root jobnet as a nested jobnet, the definition information is reset to the default status (execution order control is disabled).
-
If you copy or move the planning group defined as the jobnet to which a jobnet connector is to be connected, the execution order control information such as the jobnet connector name is also copied or moved.
-
If you attempt to copy a release target jobnet (root jobnet for which release entry is made), the jobnet definitions in Being applied status are copied. If you attempt to move a release target jobnet, definitions of all jobnets for which release entry is made are moved.
-
You cannot copy or move jobnet connectors or start conditions so that they are under a release target jobnet (root jobnet for which release entry is made).
-
If you copy or move an execution interval control job that is defined for immediate completion after the job has been started, from start conditions to a normal jobnet, the job settings are changed. The job is no longer set for immediate completion after the job has been started.
-
Return values
0 |
Normal end |
Multiple of 4 within the range from 4 to 124 |
Abnormal end |
Additional information
Units that have been copied or moved 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 copies jobnet net1 into job group grp1:
ajscopy -c -o grp1 net1