Important notes about the branch job
This section highlights some considerations and assumptions for the generic branch job design.
- The name of the branch job within the database is BRANCH. The job must have set the property Recovery options=STOP.
- The name of the signal job within the database is SIGNAL. The job must have set the property Recovery options=CONTINUE.
- The name of the branch job put into the job stream must consist of the branch job name (BRANCH) and the suffix. The suffix reflects the branch job position in the job stream. For example, BRANCH_3 is the third branch job within the job stream.
- The name of the signal job put into
the job stream must consist of the signal job name (SIGNAL) and the
suffix. The suffix reflects the signal job position in the job stream.
For example, SIGNAL_3 is the third signal job within the job stream.
The suffix counter for signal jobs is different from the suffix counter of branch jobs, therefore jobs BRANCH_3 and SIGNAL_3 can exist within one job stream at the same time, even if their suffix is identical.
- The branch job has only one parent.
This means that the branch job must have the FOLLOWS dependency exactly
set on one job in the same job stream. This is checked during the
branch job startup. If this condition is not met, the branch job ABENDS.
Connecting the branch job to more than one parent is stopped by the branch job and causes the branch job to ABEND.
- For the parent that is evaluated
against the result status (SUCC or ABEND) you must set the following
property in the job definition, not in the job stream definition:
Recovery options=Continue
- For the following branch job usage
scenarios, the branch job must have exactly two child jobs:
- ACTION_SWITCH=CANCEL (default value)
- ACTION_SWITCH=PAUSE
- The child jobs must be identified as the good child and the bad
child. The child jobs must be named as follows:
- The job that represents the good
child must have a name beginning with "G_". It is not necessary to
rename the job definition, rename the job's alias within
the job stream.
For example, the job name in the database is START_BACKUP. To use this job as the good child of the branch job, put this job in the job stream and within the job stream assign the job the alias G_START_BACKUP.
- The job that represents the bad child
must have a name beginning with "B_". It is not necessary to rename
the job definition, rename the job's alias within the job stream.
For example, the job name in the database is RESUME_DATABASE. To use this job as the bad child of the branch job, put this job into the job stream and within the job stream assign the job the alias of B_RESUME_DATABASE.
The count of the child jobs and their correct prefixes are checked during the branch job startup. If these conditions are not met, the branch job ABENDS.
- The job that represents the good
child must have a name beginning with "G_". It is not necessary to
rename the job definition, rename the job's alias within
the job stream.
- The use of quote characters is not implemented in the current version of the branch job. If you specify quote characters in either the PATTERN_i or VALUE_i parameters, the quote characters are automatically removed.
- When evaluating the complex condition, the initial search parameter
is a text pattern. This text pattern is searched for in the parent
job log. If there are more than one line that include the searched
pattern, only the first matched line is identified. The other matched
lines are ignored.
The content of the first identified line is evaluated by another subcondition, as shown in the pattern within pattern row and numeric value comparison scenarios.
- When extracting the numeric value from the pattern row, there
can be only one numeric value in the row. The numeric values of integer
and real type are accepted.
More than one number in the identified pattern row will result in incorrect numeric value extraction; all numbers from the row will be joined together and will not represent a meaningful value.
- When you use the signal scenario, the signal job must have exactly one child. The child must have a subsequent branch job and its name must comply with the naming conventions for the generic branch job.
- When using the PAUSE and RELEASE action pair, the process is as
follows:
- The first branch job sets the priority of the job that is about to be paused to 0.
- The second branch job sets the priority of job that is about to be released to 10.
This function is hardcoded. There is no implemented mechanism that would allow you to "remember" the original job's priority.
- All the information about the job stream, in which the branch job runs, is extracted from the database using the composer command when the branch job starts. This means that the branch job does not reflect any job instances that have been submitted into the job stream but do not exist in the job stream definition.