Sample: Running an application as a Java batch job
In the sample, you learn how to run the Miniloan application as a Java™ 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 and configure a Java batch execution environment by using the Operational Decision Manager for z/OS control statements. For more information about creating a batch environment, see Customizing topology 5: Embedding an execution server with your batch execution.
- Deploy the Miniloan Rule Application 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 Java Miniloan sample application
uses the following data set members:
- ++HBRWORKDS++.SHBRJCL(HBRCJCFG) to configure the Java batch environment.
- ++HBRWORKDS++.SHBRPARM(HBRBATCH),++HBRWORKDS++.SHBRPARM(HBRPSIST), and ++HBRWORKDS++.SHBRPARM(HBRCMMN), which contain runtime variables that HBRCJCFG uses to generate the ra.xml file.
- ++HBRWORKDS++.SHBRJCL(HBRMINBJ) to run the Java MiniLoan sample application.
- ++HBRWORKDS++.SHBRPARM(HBRSCEN) to contain sample data for six borrowers.
The Java source code for this sample can be found in ++HBRINSTPATH++/zexecutionserver/samples/hbrsamples.jar.
Procedure
- Submit ++HBRWORKDS++.SHBRJCL(HBRCJCFG) to generate an ra.xml configuration file and a logging.properties file.
- Verify the execution of HBRCJFG by looking at the job return code, STDOUT, and STDERR in SDSF.
- Run the Java Miniloan sample application by submitting the ++HBRWORKDS++.SHBRJCL(HBRMINBJ) job.
- View the execution results in SDSF. The Java Miniloan application prints a listing of processed input data to STDOUT. You can also use STDERR and the logs directory in the ++HBRWORKPATH++ for extra debugging information.