Before you start

Find out what you need to know before you start the tutorial.

Rule Designer provides features that you can use to abstract COBOL data structures to a business object model (BOM). With a BOM, you can write rules in more natural language than using the COBOL structures and naming directly.

A fictitious loan company uses a large COBOL application running on z/OS® to validate loan applications. In this tutorial, the company decides to use business rules to test customer eligibility for their loans.

The company wants to share rules contained in the COBOL application with other business applications, and manage the changes that are made to these rules. The company decides to migrate the business logic to a BRMS by prioritizing the most commonly shared rules. The rules that are chosen define customer eligibility. This set of rules calculates the income verification and minimum credit amount. During execution, the rules pass a message to the main program to notify the result of the initial validation.

In a real life scenario, you identify or create a COBOL copybook containing the COBOL data items that are required for the business rules. You then use this copybook as a basis for creating your execution object model (XOM). In this tutorial, you use the sample COBOL copybook provided, HBRLDAT1.cpy.

The HBRLDAT1.cpy copybook contains the following data items:


01  Borrower.
           05  name                    PIC  X(20).
           05  creditScore             PIC  9(10).
           05  yearlyIncome            PIC  9(10).
           05  age                     PIC  9(3).
               88  teenager                       VALUE 0  THRU 17.
               88  adult                          VALUE 18 THRU 60.
               88  retired                        VALUE 61 THRU 150.
       01  Loan.
           05  amount                  PIC  9(10).
           05  yearlyInterestRate      PIC  99.
           05  yearlyRepayment         PIC  9(10).
           05  effectDate              PIC  X(8).
           05  approved                PIC  X.
           05  messageCount            PIC  9(2).
           05  messages                PIC X(60)
                                       OCCURS 0 TO 99 TIMES
                                       DEPENDING ON messageCount.

From this copybook, you generate a ruleset to be deployed on zRule Execution Server for z/OS.

Next Start this tutorial: Task 1: Importing an existing rule project.

What you learn

In this tutorial, you learn how to do these tasks:
  • Import an existing rule project named reszminiloan

    If you already have a rule project named reszminiloan in your workspace, either switch to a different workspace or choose a different name.

  • Create a XOM from the sample COBOL copybook provided with this tutorial
  • Create a BOM based on the XOM
  • Add two rule packages: eligibility and validation
  • Add methods to the BOM so that you can specify conditions and actions in your rules, and map them to the XOM
  • Add a rule flow to control rule execution
  • Write a set of rules
  • Deploy your rules for rule execution to zRule Execution Server for z/OS. They are called by a COBOL application that is also running on z/OS.

Time required

This tutorial takes about one hour to complete.

Software requirements

To use this tutorial, you must have Rule Designer installed on Windows or Linux®. This tutorial uses Rule Designer on Windows.

You must also have an instance of zRule Execution Server for z/OS installed and configured on z/OS.

Note:

You can also write and manage rules by using Decision Center. However, this tutorial does not include tasks that use Decision Center.

What you need to know

To follow this tutorial, you must be familiar with certain aspects that relate to your installation:
  • You must have a basic understanding of the Enterprise COBOL programming language, know how to make calls from a COBOL program, and know how to build a COBOL application.
  • You must know where to deploy your RuleApps. Your zRule Execution Server for z/OS system administrator has configured the location where your RuleApps and XOMs must be deployed, either on the file system or in a Db2® database. If you do not know the location, contact your system administrator.
  • You must also be familiar with Rule Designer and understand some basic Business Rule Management System (BRMS) terms and concepts, such as:
    • Execution object model (XOM)
    • Business object model (BOM)
    • Verbalization
    • RuleApp
    • Ruleset
    • Decision operation
    • Deployment configuration
    • Business Action Language (BAL)
    • Rule flow

You can find all these terms in the Glossary.

For information about special considerations for rule execution in COBOL applications, see COBOL considerations for rule application development.

Important:

This tutorial is only available in American English. The rule project that contains the rules to import in this tutorial is only provided in the en_US locale. If en_US is not your default locale, you can use the samples console shortcut:

From the Start menu, click All Programs > IBM > <package_group> > Sample Server > Samples Console (en_US).

Directory structure

All the files for this tutorial are contained in the following directory: <InstallDir>/studio/tutorials/cobol/cobolstartresz, where <InstallDir> is the Decision Server installation directory.

This tutorial provides a sample COBOL copybook named HBRLDAT1.cpy for you to use. The copybook is stored in:

  • <InstallDir>/studio/tutorials/cobol/cobolstartresz/start/reszminiloan-execution/copy/HBRLDAT1.cpy.

Next Start this tutorial: Task 1: Importing an existing rule project.