On Spool jobs are jobs or started tasks that are submitted externally to Control-M, that is, jobs submitted by TSO users or CICS, or jobs received over an NJE network, and brought under the control of the Control-M monitor using a CMEM rule.
The CMEM rule that causes a job to be an On Spool job (that is, a CMEM rule that brings the external job under the control of the Control-M monitor), must be an ON JOBARRIV rule with a DO FORCEJOB statement.
To inform Control-M that this is an On Spool job and not a regular FORCEJOB request, the job scheduling definition forced by the DO FORCEJOB must "match" the arriving job, as described later in this section.
Control-M controls the entire life cycle of the job, from determining when to execute the job to performing job post-processing, according to the forced job scheduling definition.
Control-M processes On Spool jobs slightly differently than it processes regular jobs. Control-M does not submit the job because the job has already been submitted. Instead, Control-M releases the job (if held) when the runtime scheduling criteria are met. Once the job starts execution (whether the job previously required releasing or not), it is controlled by Control-M in the same way that Control-M controls regular jobs. Control-M waits for the job to finish, reads its SYSOUT, and performs all post-processing actions defined in the job scheduling definition.
Note: For Control-M/Assist users Control-M will not release the job, since the user will most likely will not submit the job in held status from his third-party-vendor scheduling product.
Creating On Spool jobs
The following components are necessary to create On Spool jobs:
The job must have the following characteristics:
This enables Control-M to read the job's SYSOUT and perform post-processing according to the job scheduling definition.
Note: Control-M/Assist users may not wish to implement this recommendation.
The CMEM rule definition must contain the following:
The job scheduling definition must have the following characteristics:
Note: Control-M/Assist users may not wish to implement this recommendation.
Handling On Spool jobs
On Spool jobs are handled as follows:
If the MEMNAME value in the requested table or job does not match the name of the arriving job, the table or job is forced and processed regularly by Control-M (a job is submitted when its runtime scheduling criteria are met, and so on).
If the MEMNAME value in the requested table or job matches the name of the arriving job, the job becomes an On Spool job and Control-M performs the following actions:
If the external job is waiting for execution in HELD state (that is, if the job arrives on spool with TYPRUN=HOLD), Control-M releases it for execution. Otherwise, Control-M verifies that the job is still in the spool (waiting for execution, executing or ended) before deciding to perform post-processing.
Note: Control-M can only handle NJE jobs as On Spool jobs when they originate on the same NJE node as that on which Control-M is running.
On Spool job scheduling definition considerations
Only one On Spool job can be created in response to a job arrival event.
However, in several cases, multiple DO FORCEJOB actions might match the arriving job. Each of these cases and the job forcing logic applied to them (to prevent multiple On Spool processes for the same external job) are described below.
The On Spool process (the match between the external job name and MEMNAME) is performed for the first DO FORCEJOB in the first matching job arrival rule only:
In either case, all subsequent DO FORCEJOB statements in the same rule (if they exist) are handled normally (that is, not as forcing On Spool jobs).
If a table containing more than one job is forced (by the first DO FORCEJOB statement in the rule, as described above), the first matching job causes the job to be an On Spool job. All the other jobs in the table are forced as regular Control-M jobs, even if they match the job name of the external job.
Only the DO FORCEJOB statements from the first triggered rule are executed (as described above). DO FORCEJOB from all other triggered job arrival rules are ignored.
Note: If an On Spool job was purged from the spool but still remains in the Active Jobs File, and another job with the same name arrives on spool and is assigned the same job ID, that later job is not forced.
JCL management considerations
When defining JCL, the following issues must be considered:
Parent Topic |