Chapter 3. Getting started with business rules 69
To deploy rule artifacts to zRule Execution Server for z/OS, follow these steps:
1. Double-click the sharinginsuranceApp project to open the RuleApp editor. Then, in the
Deployment pane, click Deploy to deploy the RuleApp to zRule Execution Server for z/OS.
2. For the deployment type, accept the “Increment RuleApp major version” default option,
and then click Next.
3. Select the “Create a temporary Rule Execution Server configuration” option, and enter the
following details:
– URL: http://<your.server.address>:<PORT>/res
– Login: resAdmin
– Password: resAdmin
4. Click Finish.
Your artifacts are deployed to zRule Execution Server for z/OS. You can build a COBOL
application to invoke the rule execution.
3.3.4 Building a COBOL application for rule execution
You deployed the rule artifacts to zRule Execution Server for z/OS. You can use the
generated copybook to build a COBOL application for rule execution on z/OS, as described in
the following sections.
Generated copybook sample
First, you must know the structure of the generated copybook, as shown in Example 3-6.
Example 3-6 Generated copybook INSSHAR.cpy
01 request.
02 driver.
03 age pic S9(5).
03 first-name pic X(20) value SPACE.
03 house-num pic S9(10).
03 last-name pic X(20) value SPACE.
03 lic-date pic 9(8).
03 lic-status pic X.
88 BoolValue value 'T'.
03 number-accidents pic S9(5).
03 zipcode pic X(20) value SPACE.
02 vehicle.
03 make pic X(20) value SPACE.
03 model pic X(20) value SPACE.
03 vec-id pic X(20) value SPACE.
03 vec-type pic X(20) value SPACE.
03 vec-value usage COMP-1.
01 response.
02 approved pic X.
88 BoolValue value 'T'.
02 base-price usage COMP-2.
02 dis-price usage COMP-2.
02 messages-Num pic 9(9).
02 messages pic X(60) value SPACE Occurs 10 Times.