Creating xJCL for the sample batch job
Use this information to create the xJCL for a batch job.
About this task
You can use the xJCL template in this task to create your own xJCL. xJCL for the feature pack sample batch applications is also provided in the zFS directory <install root>/batchfp/samples/config.
The
following sample illustrates the xJCL to define the components of
a batch job:
- The Checkpoint algorithms section, where you specify how often to commit the CICS® Units of Work (UOW) under which batch steps are started.
- The Results algorithm section, where you specify the actions to take in response to the return code of each job step.
- The Batch job steps section, where you specify the class to be run for the job step.
- The Batch Data Streams section, where you specify the data to use within a job step.
Procedure
Example
<?xml version="1.0" encoding="ASCII"?>
<job xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://core.wcg.etools.ibm.com/xsd/xJCL.xsd" name="MyBatchJob">
<job-type>Batch</job-type>
<step-scheduling-criteria>
<scheduling-mode>sequential</scheduling-mode>
</step-scheduling-criteria>
<checkpoint-algorithm name="cp">
<classname>com.ibm.wsspi.batch.checkpointalgorithms.recordbased</classname>
<props>
<prop name="recordcount" value="20"/>
<prop name="TransactionTimeOut" value="20"/>
</props>
</checkpoint-algorithm>
<results-algorithms>
<results-algorithm name="js">
<classname>com.ibm.wsspi.batch.resultsalgorithms.jobsum</classname>
</results-algorithm>
</results-algorithms>
<job-step name="MyBatchJobStep">
<classname>com.ibm.cics.batch.test.TestBatchJob</classname>
<checkpoint-algorithm-ref name="cp"/>
<batch-data-streams>
<bds>
<logical-name>inputStream</logical-name>
<impl-class>com.ibm.cics.batch.bds.impl.VsamKsdsReaderImpl</impl-class>
<props>
<prop name="CICSFILE" value="BATCHIN"/>
<prop name="START" value="F0F0F0F0"/>
<prop name="KEYLENGTH" value="4"/>
</props>
</bds>
<bds>
<logical-name>outputStream</logical-name>
<impl-class>com.ibm.cics.batch.bds.impl.VsamKsdsRecordUpdaterImpl</impl-class>
<props>
<prop name="CICSFILE" value="BATCHOUT"/>
</props>
</bds>
</batch-data-streams>
<props>
<prop name="debug" value="true"/>
</props>
<results-ref name="js"/>
</job-step>
</job>