Subordinate job pacing properties

In the top level job xJCL, users can define properties to specify the pace based on which the top level job must submit the subordinate jobs, the maximum number of concurrent subordinate jobs to be executed at a specified time, and also whether the top level job context should be persisted in the parallel job manager database.

com.ibm.ws.batch.parallel.MAXIMUM_CONCURRENT_SUBJOBS

Specify the maximum number of concurrent subordinate jobs to be run at a time. For example, consider that the top level job decides to submit 100 subordinate jobs, and the maximum number of concurrent subordinate jobs is set to 20. In this case, the top level job submits 20 jobs initially. After the subordinate jobs end, the top level job submits the next 20 subordinate jobs. The top-level job ensures that 20 subordinate jobs are running at a time. If the property is not defined, the number of concurrent subordinate jobs is unlimited.
Table 1. com.ibm.ws.batch.parallel.MAXIMUM_CONCURRENT_SUBJOBS property values
Property name MAXIMUM_CONCURRENT_SUBJOBS
Data type Integer
Default Unlimited

com.ibm.ws.batch.parallel.PERSIST_TOP_LEVEL_JOB_CONTEXT

When the property in the top level job xJCL is set to true, the context of the top level job persists in the parallel job manager database on completion of the job. The same top level job context will be used if it is restarted.
Table 2. PERSIST_TOP_LEVEL_JOB_CONTEXT property values
Property name PERSIST_TOP_LEVEL_JOB_CONTEXT
Data type Boolean
Values

true: the top level job context persists and the same is used when restarted

false: the top level job context does not persist and will not be available when restarted

Default true

com.ibm.ws.batch.parallel.MAXIMUM_SUBJOBS_SUBMISSION_THREADS

This property specifies the number of concurrent subordinate job submission threads. The submission thread exists for a short period of time.
Table 3. UseAPCEndpointSelection custom property values
Property name MAXIMUM_SUBJOBS_SUBMISSION_THREADS
Data type integer
Default None
Example of the job submissions thread:
<?xml version="1.0" encoding="UTF-8"?>
<job name="ParallelJobManager" class="${jobClass}" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
	<jndi-name>ejb/com/ibm/ws/batch/ParallelJobManagerJob</jndi-name>
	
	<step-scheduling-criteria>
		<scheduling-mode<sequential>/scheduling-mode>
	</step-scheduling-criteria>
	
	<checkpoint-algorithm name="timebased">
		<classname>com.ibm.wsspi.batch.checkpointalgorithms.timebased</classname>
		<props>
			<prop name="interval" value="60" />
			<prop name="TransactionTimeOut" value="${checkpoint.timeout}" />
		</props>
	</checkpoint-algorithm>
	
	<results-algorithms>
		<results-algorithm name="jobsum">
			<classname>com.ibm.wsspi.batch.resultsalgorithms.jobsum</classname>
			<required>Y</required>
		</results-algorithm>
	</results-algorithms>
	
	<substitution-props>
		<prop name="jobClass" value="TOPLEVELJOB" />
		<prop name="logicalTXID" value="TXID_0" />
		<prop name="wsbatch.count" value="500000" />
		<prop name="wsbatch.debit.percent" value="5" />
		<prop name="parallel.jobcount" value="6" />
		<prop name="parallel.subjob.name" value="paralleloverdraft" />
		<prop name="checkpoint.timeout" value="3600" />
		<prop name="checkpoint.interval" value="100" />
		<prop name="checkpoint.recordcount" value="100" />
	</substitution-props>
	
	<job-step name="Step1">
		<jndi-name>ejb/ParallelJobManager</jndi-name>
		<checkpoint-algorithm-ref name="timebased" />
		<results-ref name="jobsum" />
		
		<props>
			<prop name="com.ibm.ws.batch.parallel.MAXIMUM_SUBJOBS_SUBMISSION_THREADS" value="3" />
			<prop name="com.ibm.ws.batch.parallel.MAXIMUM_CONCURRENT_SUBJOBS"         value="3" />
			<prop name="com.ibm.ws.batch.parallel.PERSIST_TOP_LEVEL_JOB_CONTEXT"      value="true"/>
			<!-- The name in the job repository of the job to be submitted.  
			     Properties to be passed at job submission time are created by the 
			     parallelPostingSampleParameterizer SPI.
			     Properties are passed at submission time  
			     -->
			<prop name="com.ibm.wsspi.batch.parallel.subjob.name" value="${parallel.subjob.name}" />
			
			<!-- The optional logical transaction identifier associated with this job.
			     This value defaults to the job identifier of the Parallel Job Manager (this job ) 
			     -->
			<!-- <prop name="com.ibm.wsspi.batch.parallel.logicalTXID" value="${logicalTXID}" /> -->
			<!-- The count of parallel sub jobs to be submitted -->
			<prop name="parallel.jobcount" value="${parallel.jobcount}" />
			<!-- These properties control the runtime properites generated by the parallelPostingSampleParameterizer SPI. -->
			<prop name="wsbatch.count" value="${wsbatch.count}" />
			<prop name="wsbatch.debit.percent" value="${wsbatch.debit.percent}" />
			<prop name="checkpoint.timeout" value="${checkpoint.timeout}" />
			<prop name="checkpoint.interval" value="${checkpoint.interval}" />
			<prop name="checkpoint.recordcount" value="${checkpoint.recordcount}" />
		</props>
	</job-step>
	
</job>