Hitachi

JP1 Version 11 Job Management: Getting Started (Scripting Language)


4.3 Forcibly terminating batch jobs

There are two ways to forcibly terminate a job:

When a job is forcibly terminated, the job controller forcibly terminates its child or descendant process that are executing. For details, see 4.3.1 Forcibly terminating child or descendant processes.

After forcibly terminating the child or descendant process, the job controller performs postprocessing on the allocated files, and then terminates the job without executing any subsequent job steps or commands. The job controller does not execute a subsequent job step even if abnormal or always is specified in its run attribute. In UNIX, when a job is forcibly terminated, the adshexec command terminates with an error by signal. For details about the job processing in UNIX when SIGTERM is received, see the description in Processing when signals are received in the manual JP1/Advanced Shell. For details about the job processing in Windows when jobs are forcibly terminated, see the description in Job processing during forced termination in the manual JP1/Advanced Shell.

Important note

In Windows, when the adshexec command is started, the adshexecsub command is also started, and when the adshexec command is forcibly terminated, the adshexecsub command is also terminated. Therefore, do not forcibly terminate the adshexecsub command. If an attempt is made to forcibly terminate the adshexecsub command, the following events might occur:

  • A descendant process that is executing might not terminate.

  • Temporary files might remain in the system.

If these events occur, use the taskkill command or the task manager to forcibly terminate the descendant process and delete the temporary files manually.

Important note

Because JP1/Advanced Shell in a Windows environment uses job objects to forcibly terminate descendant processes, note the following;

  • A descendant process generated from JP1/Advanced Shell cannot be associated with a job object.

  • If a process of JP1/Advanced Shell has already been associated with a job object, forced termination of the job will not terminate the process generated by the child process of JP1/Advanced Shell.

Important note

In Windows, if a job that executes an external command and generates a child process is terminated forcibly and more than 255 processes that are at its grandchild or lower levels exist concurrently, the KNAX6381-E message might be issued and renaming of the spool job directory might fail. Note the following three points about this:

  • To reference a spool job directory that has failed, use the directory name displayed in the immediately following KNAX6382-I message that is issued.

  • A spool job directory whose renaming has failed cannot be deleted by the adshhk command. If necessary, delete it manually.

  • In the case of a job that has failed in renaming a spool job directory in the execution environment, job definition script operation information is not output by the adshevtout command.

Organization of this section