ajsagtdel
- Organization of this page
Format
ajsagtdel [-h logical-host-name] {-a execution-agent-name | -g execution-agent-group-name}
Format1 (for deleting an execution agent)
ajsagtdel [-h logical-host-name] -a execution-agent-name
Format2 (for deleting an execution agent group)
ajsagtdel [-h logical-host-name] -g execution-agent-group-name
Description
Deletes an execution agent or execution agent group.
Execution privileges
This command can be executed by a user at the following JP1 permission level:
-
JP1_JPQ_Admin privilege
Arguments
-h logical-host-name
Specify the logical host name of the local host on which the execution agent or execution agent group you want to delete is registered.
You can specify a character string of 1 to 255 bytes.
If this option is omitted, the logical host name specified in the JP1_HOSTNAME environment variable is assumed. If the JP1_HOSTNAME environment variable is not specified, the physical host name is assumed.
For a physical host, make sure that you specify neither this option nor the JP1_HOSTNAME environment variable.
-a execution-agent-name
Specify the name of an execution agent you want to delete.
You can specify a character string of 1 to 255 bytes.
-g execution-agent-group-name
Specify the name of an execution agent group you want to delete.
You can specify a character string of 1 to 255 bytes.
Notes
-
Before you execute this command, use the ajsagtalt command to change the job transfer restriction status of the execution agent you want to delete to Blocked so that jobs are not executed on the agent. For details about the job transfer restriction status of an execution agent, see 5.2 Restricting job transfer in the manual Job Management Partner 1/Automatic Job Management System 3 Overview.
Note that the job transfer restriction status of an execution agent has no effect on event jobs. Therefore, ensure that a new event job or jobnet with start conditions is not executed on the execution agent to be deleted.
You cannot delete an execution agent on which a job (PC, UNIX, custom, action, or event job) is running. To delete an execution agent on which a job is running, you must forcibly terminate the job.
You can use the ajsagtshow command to check for jobs that are running. For details on the ajsagtshow command, see ajsagtshow in 2. Commands.
-
If you execute this command on a target host on which an event job or a jobnet with start conditions was executed, the target host remembers the manager host name specified in the -h option of the command. If the target host remembers the manager host name, the host performs communication with the manager host to report that the host has started or stopped. Because this communication is unnecessary, use the following procedure to delete the manager host name specified for the -h option of this command.
To delete the manager host name remembered by the target host you want to delete:
-
Check whether the target host remembers the manager host name specified in the -h option of the ajsagtdel command.
To do this, on the target host, execute the following command:
jpoagoec -p
-
Delete the manager host specified in the -h option of the ajsagtdel command.
Execute the following command:
jpoagoec -d manager-host-name-specified-in-the-h-option
For details on the jpoagoec command, see jpoagoec in 2. Commands.
-
-
Do not perform the following operations while an event job or a jobnet with a start condition is running:
-
Stop the OS before stopping the JP1/AJS3 service on the execution host for the execution agent.
-
Turn off the target host system acting as the execution agent.
If you execute this command after performing either of these operations, the specified execution agent cannot be deleted. If this occurs, stop and cold start the JP1/AJS3 service on the manager host or delete information about event jobs or jobnets with start conditions being executed on the execution agent, and then execute the command again.
To delete information about event jobs or jobnets with start conditions being executed on the execution agent:
-
For each scheduler service, check whether there are any event jobs being executed or jobnets with start conditions being monitored by the execution agent in question.
Execute the following command:
jpomanjobshow [-h logical-host-name]# -F scheduler-service-name -a execution-agent-name
-
Stop the scheduler service you identified in step 1.
-
From the scheduler service you stopped in step 2, delete the information for the event job being executed or jobnet with start conditions being monitored by the execution agent in question.
Execute the following command:
jpomanevreset [-h logical-host-name]# -F scheduler-service-name -a execution-agent-name -s
- #
-
You do not need to specify the -h option if the manager host targeted by the command is a physical host.
For details on how to stop a scheduler service, see 8.5.2 Stopping the scheduler service in the Job Management Partner 1/Automatic Job Management System 3 Administration Guide. For details on the jpomanjobshow command, see jpomanjobshow in 2. Commands, and for details on the jpomanevreset command, see jpomanevreset in 2. Commands.
-
-
During linkage with JP1/NQSEXEC and JP1/OJE for VOS3, you cannot use this command for JP1/NQSEXEC queues and JP1/OJE for VOS3 queues.
-
This command cannot be executed for JP1/AJS3 - Manager installed on another host.
Return values
0 |
Normal end. |
4 |
|
8 |
An argument specified in the command is incorrect. |
12 |
Memory became insufficient during command processing. |
20 |
An attempt to access shared memory failed because the access target was locked. |
24 |
Permission to execute the command is not granted. |
40 |
A system limit was exceeded during allocation of shared memory, file descriptors, or resources for exclusive use. |
120 |
|
124 |
An unexpected error was detected in JP1/AJS internal processing. |
Example 1
To delete execution agent AP1, execute the following command:
ajsagtdel -a AP1
Example 2
To delete execution agent group APG1, execute the following command:
ajsagtdel -g APG1