Sample: Running an application as a batch job
In this sample, you learn how to run the COBOL or PL/I Miniloan application as a batch job. The job executes business rules on an instance of the zRule Execution Server for z/OS.
Before you begin
- Configure an instance of zRule Execution Server for z/OS.
- Deploy the COBOL or PL/I Miniloan RuleApp and the execution object model (XOM) to the persistence layer by submitting the ++HBRWORKDS++.SHBRJCL(HBRDPLOY) job.
About this task
The Miniloan application executes a set of loan eligibility rules against financial data for two borrowers. A message is returned that states whether the loans were approved or rejected.
The
COBOL and PL/I Miniloan batch applications use the following data
set members:
- ++HBRHLQ++.SHBRCOBS(HBRMINB) contains the COBOL Miniloan application.
- ++HBRHLQ++.SHBRCOBS(HBRMINBM) contains a version of the COBOL Miniloan sample that is designed to illustrate just the means of calling Operational Decision Manager from COBOL, without the additional complexities of reading in sample data.
- ++HBRHLQ++.SHBRPLIS(HBRMINBP) contains the PL/I Miniloan application.
- ++HBRWORKDS++.SHBRPARM(HBRSCEN) contains sample data for the borrowers.
- ++HBRWORKDS++.SHBRJCL(HBRMINB) contains JCL for running the COBOL Miniloan as a batch job.
- ++HBRWORKDS++.SHBRJCL(HBRMINBP) contains JCL for running the PL/I Miniloan as a batch job.
- ++HBRWORKDS++.SHBRPARM(HBRBATCH) contains runtime variables that identify the server instance to use for rule execution.
Procedure
- Start your zRule Execution Server for z/OS server instance.
- Run the Miniloan application by submitting either the ++HBRWORKDS++.SHBRJCL(HBRMINB) or ++HBRWORKDS++.SHBRJCL(HBRMINBP) job.
- Verify that the JOBSTEP return code is set to 0.
- View the execution results in SDSF. The Miniloan application returns a completion code and a reason code if an error occurs.