Page 1 of 1

How to enqueue or delete all multi instance jobs?

Posted: Fri Aug 26, 2016 9:01 am
by leandrohmvieira
Hello everyone,

Im designing a job control process based on the following example:

I have a seq:

Job1 -> Job2 -> Job3

and a table on database

REQ DEP
Job1 - Job2
Job2 - Job3

If Job1 aborts, it will prevent Job2 and Job3 to execute and so on.

To check jobs, i use a before and after subroutine to call jobs which read control tables.

But when i tested, control jobs started to abort, because when routine calls them, they were executing by other calls.

So i tried to make multi instance calls, concatenating JOBNAME with the JOBPID, but the process is still unstable somehow.

I think it aborts when it call an aborted instance of the control job (control job may abort when JOBNAME is not on the tables, or when his requisites havent executed to signal job controller to not execute).

There is a way to delete all invocation id jobs before my sequence starts?

Posted: Fri Aug 26, 2016 4:14 pm
by ray.wurlod
Delete from where?

Probably the easiest to implement would be to delete the invocationID-stamped records from the RT_STATUSnnn hashed file for the particular job (job number nnn).